Skip to main content

mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-d9f66db700351e8a/out/
python_array_test.rs

1#![doc = "MAVLink python_array_test dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#![allow(clippy::match_single_binding)]
6#[cfg(feature = "arbitrary")]
7use arbitrary::Arbitrary;
8#[allow(unused_imports)]
9use bitflags::{bitflags, Flags};
10#[allow(unused_imports)]
11use mavlink_core::{
12    bytes::Bytes, bytes_mut::BytesMut, types::CharArray, MavlinkVersion, Message, MessageData,
13};
14#[allow(unused_imports)]
15use num_derive::{FromPrimitive, ToPrimitive};
16#[allow(unused_imports)]
17use num_traits::{FromPrimitive, ToPrimitive};
18#[cfg(feature = "serde")]
19use serde::{Deserialize, Serialize};
20#[cfg(feature = "ts")]
21use ts_rs::TS;
22pub const MINOR_MAVLINK_VERSION: u8 = 3u8;
23#[cfg_attr(feature = "ts", derive(TS))]
24#[cfg_attr(feature = "ts", ts(export))]
25#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
26#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27#[cfg_attr(feature = "serde", serde(tag = "type"))]
28#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29#[repr(u32)]
30#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
31pub enum ActuatorConfiguration {
32    #[doc = "Do nothing."]
33    ACTUATOR_CONFIGURATION_NONE = 0,
34    #[doc = "Command the actuator to beep now."]
35    ACTUATOR_CONFIGURATION_BEEP = 1,
36    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
37    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
38    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
39    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
40    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
41    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
42    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
43    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
44}
45impl ActuatorConfiguration {
46    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
47}
48impl Default for ActuatorConfiguration {
49    fn default() -> Self {
50        Self::DEFAULT
51    }
52}
53#[cfg_attr(feature = "ts", derive(TS))]
54#[cfg_attr(feature = "ts", ts(export))]
55#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
56#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
57#[cfg_attr(feature = "serde", serde(tag = "type"))]
58#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
59#[repr(u32)]
60#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
61pub enum ActuatorOutputFunction {
62    #[doc = "No function (disabled)."]
63    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
64    #[doc = "Motor 1"]
65    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
66    #[doc = "Motor 2"]
67    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
68    #[doc = "Motor 3"]
69    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
70    #[doc = "Motor 4"]
71    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
72    #[doc = "Motor 5"]
73    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
74    #[doc = "Motor 6"]
75    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
76    #[doc = "Motor 7"]
77    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
78    #[doc = "Motor 8"]
79    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
80    #[doc = "Motor 9"]
81    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
82    #[doc = "Motor 10"]
83    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
84    #[doc = "Motor 11"]
85    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
86    #[doc = "Motor 12"]
87    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
88    #[doc = "Motor 13"]
89    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
90    #[doc = "Motor 14"]
91    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
92    #[doc = "Motor 15"]
93    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
94    #[doc = "Motor 16"]
95    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
96    #[doc = "Servo 1"]
97    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
98    #[doc = "Servo 2"]
99    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
100    #[doc = "Servo 3"]
101    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
102    #[doc = "Servo 4"]
103    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
104    #[doc = "Servo 5"]
105    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
106    #[doc = "Servo 6"]
107    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
108    #[doc = "Servo 7"]
109    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
110    #[doc = "Servo 8"]
111    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
112    #[doc = "Servo 9"]
113    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
114    #[doc = "Servo 10"]
115    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
116    #[doc = "Servo 11"]
117    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
118    #[doc = "Servo 12"]
119    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
120    #[doc = "Servo 13"]
121    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
122    #[doc = "Servo 14"]
123    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
124    #[doc = "Servo 15"]
125    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
126    #[doc = "Servo 16"]
127    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
128}
129impl ActuatorOutputFunction {
130    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
131}
132impl Default for ActuatorOutputFunction {
133    fn default() -> Self {
134        Self::DEFAULT
135    }
136}
137#[cfg_attr(feature = "ts", derive(TS))]
138#[cfg_attr(feature = "ts", ts(export))]
139#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
140#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
141#[cfg_attr(feature = "serde", serde(tag = "type"))]
142#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
143#[repr(u32)]
144#[doc = "Enumeration of the ADSB altimeter types"]
145pub enum AdsbAltitudeType {
146    #[doc = "Altitude reported from a Baro source using QNH reference"]
147    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
148    #[doc = "Altitude reported from a GNSS source"]
149    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
150}
151impl AdsbAltitudeType {
152    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
153}
154impl Default for AdsbAltitudeType {
155    fn default() -> Self {
156        Self::DEFAULT
157    }
158}
159#[cfg_attr(feature = "ts", derive(TS))]
160#[cfg_attr(feature = "ts", ts(export))]
161#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
162#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
163#[cfg_attr(feature = "serde", serde(tag = "type"))]
164#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
165#[repr(u32)]
166#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
167pub enum AdsbEmitterType {
168    ADSB_EMITTER_TYPE_NO_INFO = 0,
169    ADSB_EMITTER_TYPE_LIGHT = 1,
170    ADSB_EMITTER_TYPE_SMALL = 2,
171    ADSB_EMITTER_TYPE_LARGE = 3,
172    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
173    ADSB_EMITTER_TYPE_HEAVY = 5,
174    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
175    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
176    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
177    ADSB_EMITTER_TYPE_GLIDER = 9,
178    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
179    ADSB_EMITTER_TYPE_PARACHUTE = 11,
180    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
181    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
182    ADSB_EMITTER_TYPE_UAV = 14,
183    ADSB_EMITTER_TYPE_SPACE = 15,
184    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
185    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
186    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
187    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
188}
189impl AdsbEmitterType {
190    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
191}
192impl Default for AdsbEmitterType {
193    fn default() -> Self {
194        Self::DEFAULT
195    }
196}
197bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
198impl AdsbFlags {
199    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
200}
201impl Default for AdsbFlags {
202    fn default() -> Self {
203        Self::DEFAULT
204    }
205}
206bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
207impl AisFlags {
208    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
209}
210impl Default for AisFlags {
211    fn default() -> Self {
212        Self::DEFAULT
213    }
214}
215#[cfg_attr(feature = "ts", derive(TS))]
216#[cfg_attr(feature = "ts", ts(export))]
217#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
218#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
219#[cfg_attr(feature = "serde", serde(tag = "type"))]
220#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
221#[repr(u32)]
222#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
223pub enum AisNavStatus {
224    #[doc = "Under way using engine."]
225    UNDER_WAY = 0,
226    AIS_NAV_ANCHORED = 1,
227    AIS_NAV_UN_COMMANDED = 2,
228    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
229    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
230    AIS_NAV_MOORED = 5,
231    AIS_NAV_AGROUND = 6,
232    AIS_NAV_FISHING = 7,
233    AIS_NAV_SAILING = 8,
234    AIS_NAV_RESERVED_HSC = 9,
235    AIS_NAV_RESERVED_WIG = 10,
236    AIS_NAV_RESERVED_1 = 11,
237    AIS_NAV_RESERVED_2 = 12,
238    AIS_NAV_RESERVED_3 = 13,
239    #[doc = "Search And Rescue Transponder."]
240    AIS_NAV_AIS_SART = 14,
241    #[doc = "Not available (default)."]
242    AIS_NAV_UNKNOWN = 15,
243}
244impl AisNavStatus {
245    pub const DEFAULT: Self = Self::UNDER_WAY;
246}
247impl Default for AisNavStatus {
248    fn default() -> Self {
249        Self::DEFAULT
250    }
251}
252#[cfg_attr(feature = "ts", derive(TS))]
253#[cfg_attr(feature = "ts", ts(export))]
254#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
255#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
256#[cfg_attr(feature = "serde", serde(tag = "type"))]
257#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
258#[repr(u32)]
259#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
260pub enum AisType {
261    #[doc = "Not available (default)."]
262    AIS_TYPE_UNKNOWN = 0,
263    AIS_TYPE_RESERVED_1 = 1,
264    AIS_TYPE_RESERVED_2 = 2,
265    AIS_TYPE_RESERVED_3 = 3,
266    AIS_TYPE_RESERVED_4 = 4,
267    AIS_TYPE_RESERVED_5 = 5,
268    AIS_TYPE_RESERVED_6 = 6,
269    AIS_TYPE_RESERVED_7 = 7,
270    AIS_TYPE_RESERVED_8 = 8,
271    AIS_TYPE_RESERVED_9 = 9,
272    AIS_TYPE_RESERVED_10 = 10,
273    AIS_TYPE_RESERVED_11 = 11,
274    AIS_TYPE_RESERVED_12 = 12,
275    AIS_TYPE_RESERVED_13 = 13,
276    AIS_TYPE_RESERVED_14 = 14,
277    AIS_TYPE_RESERVED_15 = 15,
278    AIS_TYPE_RESERVED_16 = 16,
279    AIS_TYPE_RESERVED_17 = 17,
280    AIS_TYPE_RESERVED_18 = 18,
281    AIS_TYPE_RESERVED_19 = 19,
282    #[doc = "Wing In Ground effect."]
283    AIS_TYPE_WIG = 20,
284    AIS_TYPE_WIG_HAZARDOUS_A = 21,
285    AIS_TYPE_WIG_HAZARDOUS_B = 22,
286    AIS_TYPE_WIG_HAZARDOUS_C = 23,
287    AIS_TYPE_WIG_HAZARDOUS_D = 24,
288    AIS_TYPE_WIG_RESERVED_1 = 25,
289    AIS_TYPE_WIG_RESERVED_2 = 26,
290    AIS_TYPE_WIG_RESERVED_3 = 27,
291    AIS_TYPE_WIG_RESERVED_4 = 28,
292    AIS_TYPE_WIG_RESERVED_5 = 29,
293    AIS_TYPE_FISHING = 30,
294    AIS_TYPE_TOWING = 31,
295    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
296    AIS_TYPE_TOWING_LARGE = 32,
297    #[doc = "Dredging or other underwater ops."]
298    AIS_TYPE_DREDGING = 33,
299    AIS_TYPE_DIVING = 34,
300    AIS_TYPE_MILITARY = 35,
301    AIS_TYPE_SAILING = 36,
302    AIS_TYPE_PLEASURE = 37,
303    AIS_TYPE_RESERVED_20 = 38,
304    AIS_TYPE_RESERVED_21 = 39,
305    #[doc = "High Speed Craft."]
306    AIS_TYPE_HSC = 40,
307    AIS_TYPE_HSC_HAZARDOUS_A = 41,
308    AIS_TYPE_HSC_HAZARDOUS_B = 42,
309    AIS_TYPE_HSC_HAZARDOUS_C = 43,
310    AIS_TYPE_HSC_HAZARDOUS_D = 44,
311    AIS_TYPE_HSC_RESERVED_1 = 45,
312    AIS_TYPE_HSC_RESERVED_2 = 46,
313    AIS_TYPE_HSC_RESERVED_3 = 47,
314    AIS_TYPE_HSC_RESERVED_4 = 48,
315    AIS_TYPE_HSC_UNKNOWN = 49,
316    AIS_TYPE_PILOT = 50,
317    #[doc = "Search And Rescue vessel."]
318    AIS_TYPE_SAR = 51,
319    AIS_TYPE_TUG = 52,
320    AIS_TYPE_PORT_TENDER = 53,
321    #[doc = "Anti-pollution equipment."]
322    AIS_TYPE_ANTI_POLLUTION = 54,
323    AIS_TYPE_LAW_ENFORCEMENT = 55,
324    AIS_TYPE_SPARE_LOCAL_1 = 56,
325    AIS_TYPE_SPARE_LOCAL_2 = 57,
326    AIS_TYPE_MEDICAL_TRANSPORT = 58,
327    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
328    AIS_TYPE_NONECOMBATANT = 59,
329    AIS_TYPE_PASSENGER = 60,
330    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
331    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
332    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
333    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
334    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
335    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
336    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
337    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
338    AIS_TYPE_PASSENGER_UNKNOWN = 69,
339    AIS_TYPE_CARGO = 70,
340    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
341    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
342    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
343    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
344    AIS_TYPE_CARGO_RESERVED_1 = 75,
345    AIS_TYPE_CARGO_RESERVED_2 = 76,
346    AIS_TYPE_CARGO_RESERVED_3 = 77,
347    AIS_TYPE_CARGO_RESERVED_4 = 78,
348    AIS_TYPE_CARGO_UNKNOWN = 79,
349    AIS_TYPE_TANKER = 80,
350    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
351    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
352    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
353    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
354    AIS_TYPE_TANKER_RESERVED_1 = 85,
355    AIS_TYPE_TANKER_RESERVED_2 = 86,
356    AIS_TYPE_TANKER_RESERVED_3 = 87,
357    AIS_TYPE_TANKER_RESERVED_4 = 88,
358    AIS_TYPE_TANKER_UNKNOWN = 89,
359    AIS_TYPE_OTHER = 90,
360    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
361    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
362    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
363    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
364    AIS_TYPE_OTHER_RESERVED_1 = 95,
365    AIS_TYPE_OTHER_RESERVED_2 = 96,
366    AIS_TYPE_OTHER_RESERVED_3 = 97,
367    AIS_TYPE_OTHER_RESERVED_4 = 98,
368    AIS_TYPE_OTHER_UNKNOWN = 99,
369}
370impl AisType {
371    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
372}
373impl Default for AisType {
374    fn default() -> Self {
375        Self::DEFAULT
376    }
377}
378bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
379impl AttitudeTargetTypemask {
380    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
381}
382impl Default for AttitudeTargetTypemask {
383    fn default() -> Self {
384        Self::DEFAULT
385    }
386}
387#[cfg_attr(feature = "ts", derive(TS))]
388#[cfg_attr(feature = "ts", ts(export))]
389#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
390#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
391#[cfg_attr(feature = "serde", serde(tag = "type"))]
392#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
393#[repr(u32)]
394#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
395pub enum AutotuneAxis {
396    #[doc = "Autotune roll axis."]
397    AUTOTUNE_AXIS_ROLL = 1,
398    #[doc = "Autotune pitch axis."]
399    AUTOTUNE_AXIS_PITCH = 2,
400    #[doc = "Autotune yaw axis."]
401    AUTOTUNE_AXIS_YAW = 4,
402}
403impl AutotuneAxis {
404    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
405}
406impl Default for AutotuneAxis {
407    fn default() -> Self {
408        Self::DEFAULT
409    }
410}
411bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
412impl CameraCapFlags {
413    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
414}
415impl Default for CameraCapFlags {
416    fn default() -> Self {
417        Self::DEFAULT
418    }
419}
420#[cfg_attr(feature = "ts", derive(TS))]
421#[cfg_attr(feature = "ts", ts(export))]
422#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
423#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
424#[cfg_attr(feature = "serde", serde(tag = "type"))]
425#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
426#[repr(u32)]
427#[doc = "Camera Modes."]
428pub enum CameraMode {
429    #[doc = "Camera is in image/photo capture mode."]
430    CAMERA_MODE_IMAGE = 0,
431    #[doc = "Camera is in video capture mode."]
432    CAMERA_MODE_VIDEO = 1,
433    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
434    CAMERA_MODE_IMAGE_SURVEY = 2,
435}
436impl CameraMode {
437    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
438}
439impl Default for CameraMode {
440    fn default() -> Self {
441        Self::DEFAULT
442    }
443}
444#[cfg_attr(feature = "ts", derive(TS))]
445#[cfg_attr(feature = "ts", ts(export))]
446#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
447#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
448#[cfg_attr(feature = "serde", serde(tag = "type"))]
449#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
450#[repr(u32)]
451#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
452pub enum CameraSource {
453    #[doc = "Default camera source."]
454    CAMERA_SOURCE_DEFAULT = 0,
455    #[doc = "RGB camera source."]
456    CAMERA_SOURCE_RGB = 1,
457    #[doc = "IR camera source."]
458    CAMERA_SOURCE_IR = 2,
459    #[doc = "NDVI camera source."]
460    CAMERA_SOURCE_NDVI = 3,
461}
462impl CameraSource {
463    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
464}
465impl Default for CameraSource {
466    fn default() -> Self {
467        Self::DEFAULT
468    }
469}
470#[cfg_attr(feature = "ts", derive(TS))]
471#[cfg_attr(feature = "ts", ts(export))]
472#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
473#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
474#[cfg_attr(feature = "serde", serde(tag = "type"))]
475#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
476#[repr(u32)]
477#[doc = "Camera tracking modes"]
478pub enum CameraTrackingMode {
479    #[doc = "Not tracking"]
480    CAMERA_TRACKING_MODE_NONE = 0,
481    #[doc = "Target is a point"]
482    CAMERA_TRACKING_MODE_POINT = 1,
483    #[doc = "Target is a rectangle"]
484    CAMERA_TRACKING_MODE_RECTANGLE = 2,
485}
486impl CameraTrackingMode {
487    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
488}
489impl Default for CameraTrackingMode {
490    fn default() -> Self {
491        Self::DEFAULT
492    }
493}
494#[cfg_attr(feature = "ts", derive(TS))]
495#[cfg_attr(feature = "ts", ts(export))]
496#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
497#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
498#[cfg_attr(feature = "serde", serde(tag = "type"))]
499#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
500#[repr(u32)]
501#[doc = "Camera tracking status flags"]
502pub enum CameraTrackingStatusFlags {
503    #[doc = "Camera is not tracking"]
504    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
505    #[doc = "Camera is tracking"]
506    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
507    #[doc = "Camera tracking in error state"]
508    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
509}
510impl CameraTrackingStatusFlags {
511    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
512}
513impl Default for CameraTrackingStatusFlags {
514    fn default() -> Self {
515        Self::DEFAULT
516    }
517}
518bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
519impl CameraTrackingTargetData {
520    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
521}
522impl Default for CameraTrackingTargetData {
523    fn default() -> Self {
524        Self::DEFAULT
525    }
526}
527#[cfg_attr(feature = "ts", derive(TS))]
528#[cfg_attr(feature = "ts", ts(export))]
529#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
530#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
531#[cfg_attr(feature = "serde", serde(tag = "type"))]
532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
533#[repr(u32)]
534#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
535pub enum CameraZoomType {
536    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
537    ZOOM_TYPE_STEP = 0,
538    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
539    ZOOM_TYPE_CONTINUOUS = 1,
540    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
541    ZOOM_TYPE_RANGE = 2,
542    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
543    ZOOM_TYPE_FOCAL_LENGTH = 3,
544    #[doc = "Zoom value as horizontal field of view in degrees."]
545    ZOOM_TYPE_HORIZONTAL_FOV = 4,
546}
547impl CameraZoomType {
548    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
549}
550impl Default for CameraZoomType {
551    fn default() -> Self {
552        Self::DEFAULT
553    }
554}
555#[cfg_attr(feature = "ts", derive(TS))]
556#[cfg_attr(feature = "ts", ts(export))]
557#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
558#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
559#[cfg_attr(feature = "serde", serde(tag = "type"))]
560#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
561#[repr(u32)]
562pub enum CanFilterOp {
563    CAN_FILTER_REPLACE = 0,
564    CAN_FILTER_ADD = 1,
565    CAN_FILTER_REMOVE = 2,
566}
567impl CanFilterOp {
568    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
569}
570impl Default for CanFilterOp {
571    fn default() -> Self {
572        Self::DEFAULT
573    }
574}
575#[cfg_attr(feature = "ts", derive(TS))]
576#[cfg_attr(feature = "ts", ts(export))]
577#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
578#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
579#[cfg_attr(feature = "serde", serde(tag = "type"))]
580#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
581#[repr(u32)]
582#[doc = "Possible responses from a CELLULAR_CONFIG message."]
583pub enum CellularConfigResponse {
584    #[doc = "Changes accepted."]
585    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
586    #[doc = "Invalid APN."]
587    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
588    #[doc = "Invalid PIN."]
589    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
590    #[doc = "Changes rejected."]
591    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
592    #[doc = "PUK is required to unblock SIM card."]
593    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
594}
595impl CellularConfigResponse {
596    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
597}
598impl Default for CellularConfigResponse {
599    fn default() -> Self {
600        Self::DEFAULT
601    }
602}
603#[cfg_attr(feature = "ts", derive(TS))]
604#[cfg_attr(feature = "ts", ts(export))]
605#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
606#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
607#[cfg_attr(feature = "serde", serde(tag = "type"))]
608#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
609#[repr(u32)]
610#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
611pub enum CellularNetworkFailedReason {
612    #[doc = "No error"]
613    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
614    #[doc = "Error state is unknown"]
615    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
616    #[doc = "SIM is required for the modem but missing"]
617    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
618    #[doc = "SIM is available, but not usable for connection"]
619    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
620}
621impl CellularNetworkFailedReason {
622    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
623}
624impl Default for CellularNetworkFailedReason {
625    fn default() -> Self {
626        Self::DEFAULT
627    }
628}
629#[cfg_attr(feature = "ts", derive(TS))]
630#[cfg_attr(feature = "ts", ts(export))]
631#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
632#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
633#[cfg_attr(feature = "serde", serde(tag = "type"))]
634#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
635#[repr(u32)]
636#[doc = "Cellular network radio type"]
637pub enum CellularNetworkRadioType {
638    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
639    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
640    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
641    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
642    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
643}
644impl CellularNetworkRadioType {
645    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
646}
647impl Default for CellularNetworkRadioType {
648    fn default() -> Self {
649        Self::DEFAULT
650    }
651}
652#[cfg_attr(feature = "ts", derive(TS))]
653#[cfg_attr(feature = "ts", ts(export))]
654#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
655#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
656#[cfg_attr(feature = "serde", serde(tag = "type"))]
657#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
658#[repr(u32)]
659#[doc = "These flags encode the cellular network status"]
660pub enum CellularStatusFlag {
661    #[doc = "State unknown or not reportable."]
662    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
663    #[doc = "Modem is unusable"]
664    CELLULAR_STATUS_FLAG_FAILED = 1,
665    #[doc = "Modem is being initialized"]
666    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
667    #[doc = "Modem is locked"]
668    CELLULAR_STATUS_FLAG_LOCKED = 3,
669    #[doc = "Modem is not enabled and is powered down"]
670    CELLULAR_STATUS_FLAG_DISABLED = 4,
671    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
672    CELLULAR_STATUS_FLAG_DISABLING = 5,
673    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
674    CELLULAR_STATUS_FLAG_ENABLING = 6,
675    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
676    CELLULAR_STATUS_FLAG_ENABLED = 7,
677    #[doc = "Modem is searching for a network provider to register"]
678    CELLULAR_STATUS_FLAG_SEARCHING = 8,
679    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
680    CELLULAR_STATUS_FLAG_REGISTERED = 9,
681    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
682    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
683    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
684    CELLULAR_STATUS_FLAG_CONNECTING = 11,
685    #[doc = "One or more packet data bearers is active and connected"]
686    CELLULAR_STATUS_FLAG_CONNECTED = 12,
687}
688impl CellularStatusFlag {
689    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
690}
691impl Default for CellularStatusFlag {
692    fn default() -> Self {
693        Self::DEFAULT
694    }
695}
696#[cfg_attr(feature = "ts", derive(TS))]
697#[cfg_attr(feature = "ts", ts(export))]
698#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
699#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
700#[cfg_attr(feature = "serde", serde(tag = "type"))]
701#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
702#[repr(u32)]
703#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
704pub enum CompMetadataType {
705    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
706    COMP_METADATA_TYPE_GENERAL = 0,
707    #[doc = "Parameter meta data."]
708    COMP_METADATA_TYPE_PARAMETER = 1,
709    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
710    COMP_METADATA_TYPE_COMMANDS = 2,
711    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
712    COMP_METADATA_TYPE_PERIPHERALS = 3,
713    #[doc = "Meta data for the events interface."]
714    COMP_METADATA_TYPE_EVENTS = 4,
715    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
716    COMP_METADATA_TYPE_ACTUATORS = 5,
717}
718impl CompMetadataType {
719    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
720}
721impl Default for CompMetadataType {
722    fn default() -> Self {
723        Self::DEFAULT
724    }
725}
726#[cfg_attr(feature = "ts", derive(TS))]
727#[cfg_attr(feature = "ts", ts(export))]
728#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
729#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
730#[cfg_attr(feature = "serde", serde(tag = "type"))]
731#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
732#[repr(u32)]
733#[doc = "Indicates the ESC connection type."]
734pub enum EscConnectionType {
735    #[doc = "Traditional PPM ESC."]
736    ESC_CONNECTION_TYPE_PPM = 0,
737    #[doc = "Serial Bus connected ESC."]
738    ESC_CONNECTION_TYPE_SERIAL = 1,
739    #[doc = "One Shot PPM ESC."]
740    ESC_CONNECTION_TYPE_ONESHOT = 2,
741    #[doc = "I2C ESC."]
742    ESC_CONNECTION_TYPE_I2C = 3,
743    #[doc = "CAN-Bus ESC."]
744    ESC_CONNECTION_TYPE_CAN = 4,
745    #[doc = "DShot ESC."]
746    ESC_CONNECTION_TYPE_DSHOT = 5,
747}
748impl EscConnectionType {
749    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
750}
751impl Default for EscConnectionType {
752    fn default() -> Self {
753        Self::DEFAULT
754    }
755}
756bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
757impl EscFailureFlags {
758    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
759}
760impl Default for EscFailureFlags {
761    fn default() -> Self {
762        Self::DEFAULT
763    }
764}
765bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
766impl EstimatorStatusFlags {
767    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
768}
769impl Default for EstimatorStatusFlags {
770    fn default() -> Self {
771        Self::DEFAULT
772    }
773}
774#[cfg_attr(feature = "ts", derive(TS))]
775#[cfg_attr(feature = "ts", ts(export))]
776#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
777#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
778#[cfg_attr(feature = "serde", serde(tag = "type"))]
779#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
780#[repr(u32)]
781#[doc = "List of possible failure type to inject."]
782pub enum FailureType {
783    #[doc = "No failure injected, used to reset a previous failure."]
784    FAILURE_TYPE_OK = 0,
785    #[doc = "Sets unit off, so completely non-responsive."]
786    FAILURE_TYPE_OFF = 1,
787    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
788    FAILURE_TYPE_STUCK = 2,
789    #[doc = "Unit is reporting complete garbage."]
790    FAILURE_TYPE_GARBAGE = 3,
791    #[doc = "Unit is consistently wrong."]
792    FAILURE_TYPE_WRONG = 4,
793    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
794    FAILURE_TYPE_SLOW = 5,
795    #[doc = "Data of unit is delayed in time."]
796    FAILURE_TYPE_DELAYED = 6,
797    #[doc = "Unit is sometimes working, sometimes not."]
798    FAILURE_TYPE_INTERMITTENT = 7,
799}
800impl FailureType {
801    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
802}
803impl Default for FailureType {
804    fn default() -> Self {
805        Self::DEFAULT
806    }
807}
808#[cfg_attr(feature = "ts", derive(TS))]
809#[cfg_attr(feature = "ts", ts(export))]
810#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
811#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
812#[cfg_attr(feature = "serde", serde(tag = "type"))]
813#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
814#[repr(u32)]
815#[doc = "List of possible units where failures can be injected."]
816pub enum FailureUnit {
817    FAILURE_UNIT_SENSOR_GYRO = 0,
818    FAILURE_UNIT_SENSOR_ACCEL = 1,
819    FAILURE_UNIT_SENSOR_MAG = 2,
820    FAILURE_UNIT_SENSOR_BARO = 3,
821    FAILURE_UNIT_SENSOR_GPS = 4,
822    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
823    FAILURE_UNIT_SENSOR_VIO = 6,
824    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
825    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
826    FAILURE_UNIT_SYSTEM_BATTERY = 100,
827    FAILURE_UNIT_SYSTEM_MOTOR = 101,
828    FAILURE_UNIT_SYSTEM_SERVO = 102,
829    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
830    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
831    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
832}
833impl FailureUnit {
834    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
835}
836impl Default for FailureUnit {
837    fn default() -> Self {
838        Self::DEFAULT
839    }
840}
841#[cfg_attr(feature = "ts", derive(TS))]
842#[cfg_attr(feature = "ts", ts(export))]
843#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
844#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
845#[cfg_attr(feature = "serde", serde(tag = "type"))]
846#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
847#[repr(u32)]
848pub enum FenceBreach {
849    #[doc = "No last fence breach"]
850    FENCE_BREACH_NONE = 0,
851    #[doc = "Breached minimum altitude"]
852    FENCE_BREACH_MINALT = 1,
853    #[doc = "Breached maximum altitude"]
854    FENCE_BREACH_MAXALT = 2,
855    #[doc = "Breached fence boundary"]
856    FENCE_BREACH_BOUNDARY = 3,
857}
858impl FenceBreach {
859    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
860}
861impl Default for FenceBreach {
862    fn default() -> Self {
863        Self::DEFAULT
864    }
865}
866#[cfg_attr(feature = "ts", derive(TS))]
867#[cfg_attr(feature = "ts", ts(export))]
868#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
869#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
870#[cfg_attr(feature = "serde", serde(tag = "type"))]
871#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
872#[repr(u32)]
873#[doc = "Actions being taken to mitigate/prevent fence breach"]
874pub enum FenceMitigate {
875    #[doc = "Unknown"]
876    FENCE_MITIGATE_UNKNOWN = 0,
877    #[doc = "No actions being taken"]
878    FENCE_MITIGATE_NONE = 1,
879    #[doc = "Velocity limiting active to prevent breach"]
880    FENCE_MITIGATE_VEL_LIMIT = 2,
881}
882impl FenceMitigate {
883    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
884}
885impl Default for FenceMitigate {
886    fn default() -> Self {
887        Self::DEFAULT
888    }
889}
890#[cfg_attr(feature = "ts", derive(TS))]
891#[cfg_attr(feature = "ts", ts(export))]
892#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
893#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
894#[cfg_attr(feature = "serde", serde(tag = "type"))]
895#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
896#[repr(u32)]
897#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
898pub enum FenceType {
899    #[doc = "Maximum altitude fence"]
900    FENCE_TYPE_ALT_MAX = 1,
901    #[doc = "Circle fence"]
902    FENCE_TYPE_CIRCLE = 2,
903    #[doc = "Polygon fence"]
904    FENCE_TYPE_POLYGON = 4,
905    #[doc = "Minimum altitude fence"]
906    FENCE_TYPE_ALT_MIN = 8,
907}
908impl FenceType {
909    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
910}
911impl Default for FenceType {
912    fn default() -> Self {
913        Self::DEFAULT
914    }
915}
916#[cfg_attr(feature = "ts", derive(TS))]
917#[cfg_attr(feature = "ts", ts(export))]
918#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
920#[cfg_attr(feature = "serde", serde(tag = "type"))]
921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
922#[repr(u32)]
923#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
924pub enum FirmwareVersionType {
925    #[doc = "development release"]
926    FIRMWARE_VERSION_TYPE_DEV = 0,
927    #[doc = "alpha release"]
928    FIRMWARE_VERSION_TYPE_ALPHA = 64,
929    #[doc = "beta release"]
930    FIRMWARE_VERSION_TYPE_BETA = 128,
931    #[doc = "release candidate"]
932    FIRMWARE_VERSION_TYPE_RC = 192,
933    #[doc = "official stable release"]
934    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
935}
936impl FirmwareVersionType {
937    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
938}
939impl Default for FirmwareVersionType {
940    fn default() -> Self {
941        Self::DEFAULT
942    }
943}
944bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
945impl GimbalDeviceCapFlags {
946    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
947}
948impl Default for GimbalDeviceCapFlags {
949    fn default() -> Self {
950        Self::DEFAULT
951    }
952}
953bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
954impl GimbalDeviceErrorFlags {
955    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
956}
957impl Default for GimbalDeviceErrorFlags {
958    fn default() -> Self {
959        Self::DEFAULT
960    }
961}
962bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
963impl GimbalDeviceFlags {
964    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
965}
966impl Default for GimbalDeviceFlags {
967    fn default() -> Self {
968        Self::DEFAULT
969    }
970}
971bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
972impl GimbalManagerCapFlags {
973    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
974}
975impl Default for GimbalManagerCapFlags {
976    fn default() -> Self {
977        Self::DEFAULT
978    }
979}
980bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
981impl GimbalManagerFlags {
982    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
983}
984impl Default for GimbalManagerFlags {
985    fn default() -> Self {
986        Self::DEFAULT
987    }
988}
989#[cfg_attr(feature = "ts", derive(TS))]
990#[cfg_attr(feature = "ts", ts(export))]
991#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
992#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
993#[cfg_attr(feature = "serde", serde(tag = "type"))]
994#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
995#[repr(u32)]
996#[doc = "Type of GPS fix"]
997pub enum GpsFixType {
998    #[doc = "No GPS connected"]
999    GPS_FIX_TYPE_NO_GPS = 0,
1000    #[doc = "No position information, GPS is connected"]
1001    GPS_FIX_TYPE_NO_FIX = 1,
1002    #[doc = "2D position"]
1003    GPS_FIX_TYPE_2D_FIX = 2,
1004    #[doc = "3D position"]
1005    GPS_FIX_TYPE_3D_FIX = 3,
1006    #[doc = "DGPS/SBAS aided 3D position"]
1007    GPS_FIX_TYPE_DGPS = 4,
1008    #[doc = "RTK float, 3D position"]
1009    GPS_FIX_TYPE_RTK_FLOAT = 5,
1010    #[doc = "RTK Fixed, 3D position"]
1011    GPS_FIX_TYPE_RTK_FIXED = 6,
1012    #[doc = "Static fixed, typically used for base stations"]
1013    GPS_FIX_TYPE_STATIC = 7,
1014    #[doc = "PPP, 3D position."]
1015    GPS_FIX_TYPE_PPP = 8,
1016}
1017impl GpsFixType {
1018    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
1019}
1020impl Default for GpsFixType {
1021    fn default() -> Self {
1022        Self::DEFAULT
1023    }
1024}
1025bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
1026impl GpsInputIgnoreFlags {
1027    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
1028}
1029impl Default for GpsInputIgnoreFlags {
1030    fn default() -> Self {
1031        Self::DEFAULT
1032    }
1033}
1034#[cfg_attr(feature = "ts", derive(TS))]
1035#[cfg_attr(feature = "ts", ts(export))]
1036#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1037#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1038#[cfg_attr(feature = "serde", serde(tag = "type"))]
1039#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1040#[repr(u32)]
1041#[doc = "Gripper actions."]
1042pub enum GripperActions {
1043    #[doc = "Gripper release cargo."]
1044    GRIPPER_ACTION_RELEASE = 0,
1045    #[doc = "Gripper grab onto cargo."]
1046    GRIPPER_ACTION_GRAB = 1,
1047}
1048impl GripperActions {
1049    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
1050}
1051impl Default for GripperActions {
1052    fn default() -> Self {
1053        Self::DEFAULT
1054    }
1055}
1056bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1057impl HighresImuUpdatedFlags {
1058    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1059}
1060impl Default for HighresImuUpdatedFlags {
1061    fn default() -> Self {
1062        Self::DEFAULT
1063    }
1064}
1065bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1066impl HilActuatorControlsFlags {
1067    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1068}
1069impl Default for HilActuatorControlsFlags {
1070    fn default() -> Self {
1071        Self::DEFAULT
1072    }
1073}
1074bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1075impl HilSensorUpdatedFlags {
1076    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1077}
1078impl Default for HilSensorUpdatedFlags {
1079    fn default() -> Self {
1080        Self::DEFAULT
1081    }
1082}
1083bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1084impl HlFailureFlag {
1085    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1086}
1087impl Default for HlFailureFlag {
1088    fn default() -> Self {
1089        Self::DEFAULT
1090    }
1091}
1092bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1093impl IlluminatorErrorFlags {
1094    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1095}
1096impl Default for IlluminatorErrorFlags {
1097    fn default() -> Self {
1098        Self::DEFAULT
1099    }
1100}
1101#[cfg_attr(feature = "ts", derive(TS))]
1102#[cfg_attr(feature = "ts", ts(export))]
1103#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1104#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1105#[cfg_attr(feature = "serde", serde(tag = "type"))]
1106#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1107#[repr(u32)]
1108#[doc = "Modes of illuminator"]
1109pub enum IlluminatorMode {
1110    #[doc = "Illuminator mode is not specified/unknown"]
1111    ILLUMINATOR_MODE_UNKNOWN = 0,
1112    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1113    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1114    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1115    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1116}
1117impl IlluminatorMode {
1118    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1119}
1120impl Default for IlluminatorMode {
1121    fn default() -> Self {
1122        Self::DEFAULT
1123    }
1124}
1125#[cfg_attr(feature = "ts", derive(TS))]
1126#[cfg_attr(feature = "ts", ts(export))]
1127#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1128#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1129#[cfg_attr(feature = "serde", serde(tag = "type"))]
1130#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1131#[repr(u32)]
1132#[doc = "Type of landing target"]
1133pub enum LandingTargetType {
1134    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1135    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1136    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1137    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1138    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1139    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1140    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1141    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1142}
1143impl LandingTargetType {
1144    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1145}
1146impl Default for LandingTargetType {
1147    fn default() -> Self {
1148        Self::DEFAULT
1149    }
1150}
1151#[cfg_attr(feature = "ts", derive(TS))]
1152#[cfg_attr(feature = "ts", ts(export))]
1153#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1154#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1155#[cfg_attr(feature = "serde", serde(tag = "type"))]
1156#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1157#[repr(u32)]
1158pub enum MagCalStatus {
1159    MAG_CAL_NOT_STARTED = 0,
1160    MAG_CAL_WAITING_TO_START = 1,
1161    MAG_CAL_RUNNING_STEP_ONE = 2,
1162    MAG_CAL_RUNNING_STEP_TWO = 3,
1163    MAG_CAL_SUCCESS = 4,
1164    MAG_CAL_FAILED = 5,
1165    MAG_CAL_BAD_ORIENTATION = 6,
1166    MAG_CAL_BAD_RADIUS = 7,
1167}
1168impl MagCalStatus {
1169    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1170}
1171impl Default for MagCalStatus {
1172    fn default() -> Self {
1173        Self::DEFAULT
1174    }
1175}
1176#[cfg_attr(feature = "ts", derive(TS))]
1177#[cfg_attr(feature = "ts", ts(export))]
1178#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1179#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1180#[cfg_attr(feature = "serde", serde(tag = "type"))]
1181#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1182#[repr(u32)]
1183pub enum MavArmAuthDeniedReason {
1184    #[doc = "Not a specific reason"]
1185    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1186    #[doc = "Authorizer will send the error as string to GCS"]
1187    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1188    #[doc = "At least one waypoint have a invalid value"]
1189    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1190    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1191    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1192    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1193    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1194    #[doc = "Weather is not good to fly"]
1195    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1196}
1197impl MavArmAuthDeniedReason {
1198    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1199}
1200impl Default for MavArmAuthDeniedReason {
1201    fn default() -> Self {
1202        Self::DEFAULT
1203    }
1204}
1205#[cfg_attr(feature = "ts", derive(TS))]
1206#[cfg_attr(feature = "ts", ts(export))]
1207#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1208#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1209#[cfg_attr(feature = "serde", serde(tag = "type"))]
1210#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1211#[repr(u32)]
1212#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1213pub enum MavAutopilot {
1214    #[doc = "Generic autopilot, full support for everything"]
1215    MAV_AUTOPILOT_GENERIC = 0,
1216    #[doc = "Reserved for future use."]
1217    MAV_AUTOPILOT_RESERVED = 1,
1218    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1219    MAV_AUTOPILOT_SLUGS = 2,
1220    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1221    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1222    #[doc = "OpenPilot, <http://openpilot.org>"]
1223    MAV_AUTOPILOT_OPENPILOT = 4,
1224    #[doc = "Generic autopilot only supporting simple waypoints"]
1225    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1226    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1227    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1228    #[doc = "Generic autopilot supporting the full mission command set"]
1229    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1230    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1231    MAV_AUTOPILOT_INVALID = 8,
1232    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1233    MAV_AUTOPILOT_PPZ = 9,
1234    #[doc = "UAV Dev Board"]
1235    MAV_AUTOPILOT_UDB = 10,
1236    #[doc = "FlexiPilot"]
1237    MAV_AUTOPILOT_FP = 11,
1238    #[doc = "PX4 Autopilot - <http://px4.io/>"]
1239    MAV_AUTOPILOT_PX4 = 12,
1240    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1241    MAV_AUTOPILOT_SMACCMPILOT = 13,
1242    #[doc = "AutoQuad -- <http://autoquad.org>"]
1243    MAV_AUTOPILOT_AUTOQUAD = 14,
1244    #[doc = "Armazila -- <http://armazila.com>"]
1245    MAV_AUTOPILOT_ARMAZILA = 15,
1246    #[doc = "Aerob -- <http://aerob.ru>"]
1247    MAV_AUTOPILOT_AEROB = 16,
1248    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1249    MAV_AUTOPILOT_ASLUAV = 17,
1250    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1251    MAV_AUTOPILOT_SMARTAP = 18,
1252    #[doc = "AirRails - <http://uaventure.com>"]
1253    MAV_AUTOPILOT_AIRRAILS = 19,
1254    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1255    MAV_AUTOPILOT_REFLEX = 20,
1256}
1257impl MavAutopilot {
1258    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1259}
1260impl Default for MavAutopilot {
1261    fn default() -> Self {
1262        Self::DEFAULT
1263    }
1264}
1265#[cfg_attr(feature = "ts", derive(TS))]
1266#[cfg_attr(feature = "ts", ts(export))]
1267#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1268#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1269#[cfg_attr(feature = "serde", serde(tag = "type"))]
1270#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1271#[repr(u32)]
1272#[doc = "Enumeration for battery charge states."]
1273pub enum MavBatteryChargeState {
1274    #[doc = "Low battery state is not provided"]
1275    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1276    #[doc = "Battery is not in low state. Normal operation."]
1277    MAV_BATTERY_CHARGE_STATE_OK = 1,
1278    #[doc = "Battery state is low, warn and monitor close."]
1279    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1280    #[doc = "Battery state is critical, return or abort immediately."]
1281    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1282    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1283    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1284    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1285    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1286    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1287    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1288    #[doc = "Battery is charging."]
1289    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1290}
1291impl MavBatteryChargeState {
1292    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1293}
1294impl Default for MavBatteryChargeState {
1295    fn default() -> Self {
1296        Self::DEFAULT
1297    }
1298}
1299bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1300impl MavBatteryFault {
1301    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1302}
1303impl Default for MavBatteryFault {
1304    fn default() -> Self {
1305        Self::DEFAULT
1306    }
1307}
1308#[cfg_attr(feature = "ts", derive(TS))]
1309#[cfg_attr(feature = "ts", ts(export))]
1310#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1311#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1312#[cfg_attr(feature = "serde", serde(tag = "type"))]
1313#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1314#[repr(u32)]
1315#[doc = "Enumeration of battery functions"]
1316pub enum MavBatteryFunction {
1317    #[doc = "Battery function is unknown"]
1318    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1319    #[doc = "Battery supports all flight systems"]
1320    MAV_BATTERY_FUNCTION_ALL = 1,
1321    #[doc = "Battery for the propulsion system"]
1322    MAV_BATTERY_FUNCTION_PROPULSION = 2,
1323    #[doc = "Avionics battery"]
1324    MAV_BATTERY_FUNCTION_AVIONICS = 3,
1325    #[doc = "Payload battery"]
1326    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1327}
1328impl MavBatteryFunction {
1329    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1330}
1331impl Default for MavBatteryFunction {
1332    fn default() -> Self {
1333        Self::DEFAULT
1334    }
1335}
1336#[cfg_attr(feature = "ts", derive(TS))]
1337#[cfg_attr(feature = "ts", ts(export))]
1338#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1339#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1340#[cfg_attr(feature = "serde", serde(tag = "type"))]
1341#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1342#[repr(u32)]
1343#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1344pub enum MavBatteryMode {
1345    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1346    MAV_BATTERY_MODE_UNKNOWN = 0,
1347    #[doc = "Battery is auto discharging (towards storage level)."]
1348    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1349    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1350    MAV_BATTERY_MODE_HOT_SWAP = 2,
1351}
1352impl MavBatteryMode {
1353    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1354}
1355impl Default for MavBatteryMode {
1356    fn default() -> Self {
1357        Self::DEFAULT
1358    }
1359}
1360#[cfg_attr(feature = "ts", derive(TS))]
1361#[cfg_attr(feature = "ts", ts(export))]
1362#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1363#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1364#[cfg_attr(feature = "serde", serde(tag = "type"))]
1365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1366#[repr(u32)]
1367#[doc = "Enumeration of battery types"]
1368pub enum MavBatteryType {
1369    #[doc = "Not specified."]
1370    MAV_BATTERY_TYPE_UNKNOWN = 0,
1371    #[doc = "Lithium polymer battery"]
1372    MAV_BATTERY_TYPE_LIPO = 1,
1373    #[doc = "Lithium-iron-phosphate battery"]
1374    MAV_BATTERY_TYPE_LIFE = 2,
1375    #[doc = "Lithium-ION battery"]
1376    MAV_BATTERY_TYPE_LION = 3,
1377    #[doc = "Nickel metal hydride battery"]
1378    MAV_BATTERY_TYPE_NIMH = 4,
1379}
1380impl MavBatteryType {
1381    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1382}
1383impl Default for MavBatteryType {
1384    fn default() -> Self {
1385        Self::DEFAULT
1386    }
1387}
1388#[cfg_attr(feature = "ts", derive(TS))]
1389#[cfg_attr(feature = "ts", ts(export))]
1390#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1391#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1392#[cfg_attr(feature = "serde", serde(tag = "type"))]
1393#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1394#[repr(u32)]
1395#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1396pub enum MavCmd {
1397    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1398    #[doc = ""]
1399    #[doc = "# Parameters"]
1400    #[doc = ""]
1401    #[doc = "| Parameter | Description | Values | Units |"]
1402    #[doc = "| --------- | ----------- | ------ | ----- |"]
1403    #[doc = "| 1 (Hold)  | Hold time. (ignored by fixed wing, time to stay at waypoint for rotary wing)| &ge; 0 | s |"]
1404    #[doc = "| 2 (Accept Radius)| Acceptance radius (if the sphere with this radius is hit, the waypoint counts as reached)| &ge; 0 | m |"]
1405    #[doc = "| 3 (Pass Radius)| 0 to pass through the WP, if&gt;0 radius to pass by WP. Positive value for clockwise orbit, negative value for counter-clockwise orbit. Allows trajectory control.|  | m |"]
1406    #[doc = "| 4 (Yaw)   | Desired yaw angle at waypoint (rotary wing). NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).|  | deg |"]
1407    #[doc = "| 5 (Latitude)| Latitude    |  |  |"]
1408    #[doc = "| 6 (Longitude)| Longitude   |  |  |"]
1409    #[doc = "| 7 (Altitude)| Altitude    |  | m |"]
1410    MAV_CMD_NAV_WAYPOINT = 16,
1411    #[doc = "Loiter around this waypoint an unlimited amount of time"]
1412    #[doc = ""]
1413    #[doc = "# Parameters"]
1414    #[doc = ""]
1415    #[doc = "| Parameter | Description | Units |"]
1416    #[doc = "| --------- | ----------- | ----- |"]
1417    #[doc = "| 1         | Empty       |  |"]
1418    #[doc = "| 2         | Empty       |  |"]
1419    #[doc = "| 3 (Radius)| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, else counter-clockwise| m |"]
1420    #[doc = "| 4 (Yaw)   | Desired yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| deg |"]
1421    #[doc = "| 5 (Latitude)| Latitude    |  |"]
1422    #[doc = "| 6 (Longitude)| Longitude   |  |"]
1423    #[doc = "| 7 (Altitude)| Altitude    | m |"]
1424    MAV_CMD_NAV_LOITER_UNLIM = 17,
1425    #[doc = "Loiter around this waypoint for X turns"]
1426    #[doc = ""]
1427    #[doc = "# Parameters"]
1428    #[doc = ""]
1429    #[doc = "| Parameter | Description | Values | Units |"]
1430    #[doc = "| --------- | ----------- | ------ | ----- |"]
1431    #[doc = "| 1 (Turns) | Number of turns.| &ge; 0 |  |"]
1432    #[doc = "| 2 (Heading Required)| Leave loiter circle only once heading towards the next waypoint (0 = False)| 0, 1 |  |"]
1433    #[doc = "| 3 (Radius)| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, else counter-clockwise|  | m |"]
1434    #[doc = "| 4 (Xtrack Location)| Loiter circle exit location and/or path to next waypoint (\"xtrack\") for forward-only moving vehicles (not multicopters). 0 for the vehicle to converge towards the center xtrack when it leaves the loiter (the line between the centers of the current and next waypoint), 1 to converge to the direct line between the location that the vehicle exits the loiter radius and the next waypoint. Otherwise the angle (in degrees) between the tangent of the loiter circle and the center xtrack at which the vehicle must leave the loiter (and converge to the center xtrack). NaN to use the current system default xtrack behaviour.|  |  |"]
1435    #[doc = "| 5 (Latitude)| Latitude    |  |  |"]
1436    #[doc = "| 6 (Longitude)| Longitude   |  |  |"]
1437    #[doc = "| 7 (Altitude)| Altitude    |  | m |"]
1438    MAV_CMD_NAV_LOITER_TURNS = 18,
1439    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1440    #[doc = ""]
1441    #[doc = "# Parameters"]
1442    #[doc = ""]
1443    #[doc = "| Parameter | Description | Values | Units |"]
1444    #[doc = "| --------- | ----------- | ------ | ----- |"]
1445    #[doc = "| 1 (Time)  | Loiter time (only starts once Lat, Lon and Alt is reached).| &ge; 0 | s |"]
1446    #[doc = "| 2 (Heading Required)| Leave loiter circle only once heading towards the next waypoint (0 = False)| 0, 1 |  |"]
1447    #[doc = "| 3 (Radius)| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, else counter-clockwise.|  | m |"]
1448    #[doc = "| 4 (Xtrack Location)| Loiter circle exit location and/or path to next waypoint (\"xtrack\") for forward-only moving vehicles (not multicopters). 0 for the vehicle to converge towards the center xtrack when it leaves the loiter (the line between the centers of the current and next waypoint), 1 to converge to the direct line between the location that the vehicle exits the loiter radius and the next waypoint. Otherwise the angle (in degrees) between the tangent of the loiter circle and the center xtrack at which the vehicle must leave the loiter (and converge to the center xtrack). NaN to use the current system default xtrack behaviour.|  |  |"]
1449    #[doc = "| 5 (Latitude)| Latitude    |  |  |"]
1450    #[doc = "| 6 (Longitude)| Longitude   |  |  |"]
1451    #[doc = "| 7 (Altitude)| Altitude    |  | m |"]
1452    MAV_CMD_NAV_LOITER_TIME = 19,
1453    #[doc = "Return to launch location"]
1454    #[doc = ""]
1455    #[doc = "# Parameters"]
1456    #[doc = ""]
1457    #[doc = "| Parameter | Description |"]
1458    #[doc = "| --------- | ----------- |"]
1459    #[doc = "| 1         | Empty       |"]
1460    #[doc = "| 2         | Empty       |"]
1461    #[doc = "| 3         | Empty       |"]
1462    #[doc = "| 4         | Empty       |"]
1463    #[doc = "| 5         | Empty       |"]
1464    #[doc = "| 6         | Empty       |"]
1465    #[doc = "| 7         | Empty       |"]
1466    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1467    #[doc = "Land at location."]
1468    #[doc = ""]
1469    #[doc = "# Parameters"]
1470    #[doc = ""]
1471    #[doc = "| Parameter | Description | Values | Units |"]
1472    #[doc = "| --------- | ----------- | ------ | ----- |"]
1473    #[doc = "| 1 (Abort Alt)| Minimum target altitude if landing is aborted (0 = undefined/use system default).|  | m |"]
1474    #[doc = "| 2 (Land Mode)| Precision land mode.| [`PrecisionLandMode`] |  |"]
1475    #[doc = "| 3         | Empty.      |  |  |"]
1476    #[doc = "| 4 (Yaw Angle)| Desired yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).|  | deg |"]
1477    #[doc = "| 5 (Latitude)| Latitude.   |  |  |"]
1478    #[doc = "| 6 (Longitude)| Longitude.  |  |  |"]
1479    #[doc = "| 7 (Altitude)| Landing altitude (ground level in current frame).|  | m |"]
1480    MAV_CMD_NAV_LAND = 21,
1481    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1482    #[doc = ""]
1483    #[doc = "# Parameters"]
1484    #[doc = ""]
1485    #[doc = "| Parameter | Description | Units |"]
1486    #[doc = "| --------- | ----------- | ----- |"]
1487    #[doc = "| 1 (Pitch) | Minimum pitch (if airspeed sensor present), desired pitch without sensor| deg |"]
1488    #[doc = "| 2         | Empty       |  |"]
1489    #[doc = "| 3         | Empty       |  |"]
1490    #[doc = "| 4 (Yaw)   | Yaw angle (if magnetometer present), ignored without magnetometer. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| deg |"]
1491    #[doc = "| 5 (Latitude)| Latitude    |  |"]
1492    #[doc = "| 6 (Longitude)| Longitude   |  |"]
1493    #[doc = "| 7 (Altitude)| Altitude    | m |"]
1494    MAV_CMD_NAV_TAKEOFF = 22,
1495    #[doc = "Land at local position (local frame only)"]
1496    #[doc = ""]
1497    #[doc = "# Parameters"]
1498    #[doc = ""]
1499    #[doc = "| Parameter | Description | Values | Units |"]
1500    #[doc = "| --------- | ----------- | ------ | ----- |"]
1501    #[doc = "| 1 (Target)| Landing target number (if available)| 0, 1, .. |  |"]
1502    #[doc = "| 2 (Offset)| Maximum accepted offset from desired landing position - computed magnitude from spherical coordinates: d = sqrt(x^2 + y^2 + z^2), which gives the maximum accepted distance between the desired landing position and the position where the vehicle is about to land| &ge; 0 | m |"]
1503    #[doc = "| 3 (Descend Rate)| Landing descend rate|  | m/s |"]
1504    #[doc = "| 4 (Yaw)   | Desired yaw angle|  | rad |"]
1505    #[doc = "| 5 (Y Position)| Y-axis position|  | m |"]
1506    #[doc = "| 6 (X Position)| X-axis position|  | m |"]
1507    #[doc = "| 7 (Z Position)| Z-axis / ground level position|  | m |"]
1508    MAV_CMD_NAV_LAND_LOCAL = 23,
1509    #[doc = "Takeoff from local position (local frame only)"]
1510    #[doc = ""]
1511    #[doc = "# Parameters"]
1512    #[doc = ""]
1513    #[doc = "| Parameter | Description | Units |"]
1514    #[doc = "| --------- | ----------- | ----- |"]
1515    #[doc = "| 1 (Pitch) | Minimum pitch (if airspeed sensor present), desired pitch without sensor| rad |"]
1516    #[doc = "| 2         | Empty       |  |"]
1517    #[doc = "| 3 (Ascend Rate)| Takeoff ascend rate| m/s |"]
1518    #[doc = "| 4 (Yaw)   | Yaw angle (if magnetometer or another yaw estimation source present), ignored without one of these| rad |"]
1519    #[doc = "| 5 (Y Position)| Y-axis position| m |"]
1520    #[doc = "| 6 (X Position)| X-axis position| m |"]
1521    #[doc = "| 7 (Z Position)| Z-axis position| m |"]
1522    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1523    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1524    #[doc = ""]
1525    #[doc = "# Parameters"]
1526    #[doc = ""]
1527    #[doc = "| Parameter | Description | Values | Units |"]
1528    #[doc = "| --------- | ----------- | ------ | ----- |"]
1529    #[doc = "| 1 (Following)| Following logic to use (e.g. loitering or sinusoidal following) - depends on specific autopilot implementation| Multiples of 1 |  |"]
1530    #[doc = "| 2 (Ground Speed)| Ground speed of vehicle to be followed|  | m/s |"]
1531    #[doc = "| 3 (Radius)| Radius around waypoint. If positive loiter clockwise, else counter-clockwise|  | m |"]
1532    #[doc = "| 4 (Yaw)   | Desired yaw angle.|  | deg |"]
1533    #[doc = "| 5 (Latitude)| Latitude    |  |  |"]
1534    #[doc = "| 6 (Longitude)| Longitude   |  |  |"]
1535    #[doc = "| 7 (Altitude)| Altitude    |  | m |"]
1536    MAV_CMD_NAV_FOLLOW = 25,
1537    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1538    #[doc = ""]
1539    #[doc = "# Parameters"]
1540    #[doc = ""]
1541    #[doc = "| Parameter | Description | Values | Units |"]
1542    #[doc = "| --------- | ----------- | ------ | ----- |"]
1543    #[doc = "| 1 (Action)| Climb or Descend (0 = Neutral, command completes when within 5m of this command's altitude, 1 = Climbing, command completes when at or above this command's altitude, 2 = Descending, command completes when at or below this command's altitude.| 0, 1, 2 |  |"]
1544    #[doc = "| 2         | Empty       |  |  |"]
1545    #[doc = "| 3         | Empty       |  |  |"]
1546    #[doc = "| 4         | Empty       |  |  |"]
1547    #[doc = "| 5         | Empty       |  |  |"]
1548    #[doc = "| 6         | Empty       |  |  |"]
1549    #[doc = "| 7 (Altitude)| Desired altitude|  | m |"]
1550    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1551    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1552    #[doc = ""]
1553    #[doc = "# Parameters"]
1554    #[doc = ""]
1555    #[doc = "| Parameter | Description | Values | Units |"]
1556    #[doc = "| --------- | ----------- | ------ | ----- |"]
1557    #[doc = "| 1 (Heading Required)| Leave loiter circle only once heading towards the next waypoint (0 = False)| 0, 1 |  |"]
1558    #[doc = "| 2 (Radius)| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, negative counter-clockwise, 0 means no change to standard loiter.|  | m |"]
1559    #[doc = "| 3         | Empty       |  |  |"]
1560    #[doc = "| 4 (Xtrack Location)| Loiter circle exit location and/or path to next waypoint (\"xtrack\") for forward-only moving vehicles (not multicopters). 0 for the vehicle to converge towards the center xtrack when it leaves the loiter (the line between the centers of the current and next waypoint), 1 to converge to the direct line between the location that the vehicle exits the loiter radius and the next waypoint. Otherwise the angle (in degrees) between the tangent of the loiter circle and the center xtrack at which the vehicle must leave the loiter (and converge to the center xtrack). NaN to use the current system default xtrack behaviour.| 0, 1 |  |"]
1561    #[doc = "| 5 (Latitude)| Latitude    |  |  |"]
1562    #[doc = "| 6 (Longitude)| Longitude   |  |  |"]
1563    #[doc = "| 7 (Altitude)| Altitude    |  | m |"]
1564    MAV_CMD_NAV_LOITER_TO_ALT = 31,
1565    #[doc = "Begin following a target"]
1566    #[doc = ""]
1567    #[doc = "# Parameters"]
1568    #[doc = ""]
1569    #[doc = "| Parameter | Description | Values | Units |"]
1570    #[doc = "| --------- | ----------- | ------ | ----- |"]
1571    #[doc = "| 1 (System ID)| System ID (of the FOLLOW_TARGET beacon). Send 0 to disable follow-me and return to the default position hold mode.| 0, 1, .. , 255 |  |"]
1572    #[doc = "| 2         | Reserved    |  |  |"]
1573    #[doc = "| 3         | Reserved    |  |  |"]
1574    #[doc = "| 4 (Altitude Mode)| Altitude mode: 0: Keep current altitude, 1: keep altitude difference to target, 2: go to a fixed altitude above home.| 0, 1, 2 |  |"]
1575    #[doc = "| 5 (Altitude)| Altitude above home. (used if mode=2)|  | m |"]
1576    #[doc = "| 6         | Reserved    |  |  |"]
1577    #[doc = "| 7 (Time to Land)| Time to land in which the MAV should go to the default position hold mode after a message RX timeout.| &ge; 0 | s |"]
1578    MAV_CMD_DO_FOLLOW = 32,
1579    #[doc = "Reposition the MAV after a follow target command has been sent"]
1580    #[doc = ""]
1581    #[doc = "# Parameters"]
1582    #[doc = ""]
1583    #[doc = "| Parameter | Description | Units |"]
1584    #[doc = "| --------- | ----------- | ----- |"]
1585    #[doc = "| 1 (Camera Q1)| Camera q1 (where 0 is on the ray from the camera to the tracking device)|  |"]
1586    #[doc = "| 2 (Camera Q2)| Camera q2   |  |"]
1587    #[doc = "| 3 (Camera Q3)| Camera q3   |  |"]
1588    #[doc = "| 4 (Camera Q4)| Camera q4   |  |"]
1589    #[doc = "| 5 (Altitude Offset)| altitude offset from target| m |"]
1590    #[doc = "| 6 (X Offset)| X offset from target| m |"]
1591    #[doc = "| 7 (Y Offset)| Y offset from target| m |"]
1592    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1593    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1594    #[doc = ""]
1595    #[doc = "# Parameters"]
1596    #[doc = ""]
1597    #[doc = "| Parameter | Description | Values | Units |"]
1598    #[doc = "| --------- | ----------- | ------ | ----- |"]
1599    #[doc = "| 1 (Radius)| Radius of the circle. Positive: orbit clockwise. Negative: orbit counter-clockwise. NaN: Use vehicle default radius, or current radius if already orbiting.|  | m |"]
1600    #[doc = "| 2 (Velocity)| Tangential Velocity. NaN: Use vehicle default velocity, or current velocity if already orbiting.|  | m/s |"]
1601    #[doc = "| 3 (Yaw Behavior)| Yaw behavior of the vehicle.| [`OrbitYawBehaviour`] |  |"]
1602    #[doc = "| 4 (Orbits)| Orbit around the centre point for this many radians (i.e. for a three-quarter orbit set 270*Pi/180). 0: Orbit forever. NaN: Use vehicle default, or current value if already orbiting.| &ge; 0 | rad |"]
1603    #[doc = "| 5 (Latitude/X)| Center point latitude (if no MAV_FRAME specified) / X coordinate according to MAV_FRAME. INT32_MAX (or NaN if sent in COMMAND_LONG): Use current vehicle position, or current center if already orbiting.|  |  |"]
1604    #[doc = "| 6 (Longitude/Y)| Center point longitude (if no MAV_FRAME specified) / Y coordinate according to MAV_FRAME. INT32_MAX (or NaN if sent in COMMAND_LONG): Use current vehicle position, or current center if already orbiting.|  |  |"]
1605    #[doc = "| 7 (Altitude/Z)| Center point altitude (MSL) (if no MAV_FRAME specified) / Z coordinate according to MAV_FRAME. NaN: Use current vehicle altitude.|  |  |"]
1606    MAV_CMD_DO_ORBIT = 34,
1607    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1608    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1609    #[doc = ""]
1610    #[doc = "# Parameters"]
1611    #[doc = ""]
1612    #[doc = "| Parameter | Description | Values |"]
1613    #[doc = "| --------- | ----------- | ------ |"]
1614    #[doc = "| 1 (ROI Mode)| Region of interest mode.| [`MavRoi`] |"]
1615    #[doc = "| 2 (WP Index)| Waypoint index/ target ID. (see MAV_ROI enum)| 0, 1, .. |"]
1616    #[doc = "| 3 (ROI Index)| ROI index (allows a vehicle to manage multiple ROI's)| 0, 1, .. |"]
1617    #[doc = "| 4         | Empty       |  |"]
1618    #[doc = "| 5 (X)     | x the location of the fixed ROI (see MAV_FRAME)|  |"]
1619    #[doc = "| 6 (Y)     | y           |  |"]
1620    #[doc = "| 7 (Z)     | z           |  |"]
1621    MAV_CMD_NAV_ROI = 80,
1622    #[doc = "Control autonomous path planning on the MAV."]
1623    #[doc = ""]
1624    #[doc = "# Parameters"]
1625    #[doc = ""]
1626    #[doc = "| Parameter | Description | Values | Units |"]
1627    #[doc = "| --------- | ----------- | ------ | ----- |"]
1628    #[doc = "| 1 (Local Ctrl)| 0: Disable local obstacle avoidance / local path planning (without resetting map), 1: Enable local path planning, 2: Enable and reset local path planning| 0, 1, 2 |  |"]
1629    #[doc = "| 2 (Global Ctrl)| 0: Disable full path planning (without resetting map), 1: Enable, 2: Enable and reset map/occupancy grid, 3: Enable and reset planned route, but not occupancy grid| 0, 1, .. , 3 |  |"]
1630    #[doc = "| 3         | Empty       |  |  |"]
1631    #[doc = "| 4 (Yaw)   | Yaw angle at goal|  | deg |"]
1632    #[doc = "| 5 (Latitude/X)| Latitude/X of goal|  |  |"]
1633    #[doc = "| 6 (Longitude/Y)| Longitude/Y of goal|  |  |"]
1634    #[doc = "| 7 (Altitude/Z)| Altitude/Z of goal|  |  |"]
1635    MAV_CMD_NAV_PATHPLANNING = 81,
1636    #[doc = "Navigate to waypoint using a spline path."]
1637    #[doc = ""]
1638    #[doc = "# Parameters"]
1639    #[doc = ""]
1640    #[doc = "| Parameter | Description | Values | Units |"]
1641    #[doc = "| --------- | ----------- | ------ | ----- |"]
1642    #[doc = "| 1 (Hold)  | Hold time. (ignored by fixed wing, time to stay at waypoint for rotary wing)| &ge; 0 | s |"]
1643    #[doc = "| 2         | Empty       |  |  |"]
1644    #[doc = "| 3         | Empty       |  |  |"]
1645    #[doc = "| 4         | Empty       |  |  |"]
1646    #[doc = "| 5 (Latitude/X)| Latitude/X of goal|  |  |"]
1647    #[doc = "| 6 (Longitude/Y)| Longitude/Y of goal|  |  |"]
1648    #[doc = "| 7 (Altitude/Z)| Altitude/Z of goal|  |  |"]
1649    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1650    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1651    #[doc = ""]
1652    #[doc = "# Parameters"]
1653    #[doc = ""]
1654    #[doc = "| Parameter | Description | Values | Units |"]
1655    #[doc = "| --------- | ----------- | ------ | ----- |"]
1656    #[doc = "| 1         | Empty       |  |  |"]
1657    #[doc = "| 2 (Transition Heading)| Front transition heading.| [`VtolTransitionHeading`] |  |"]
1658    #[doc = "| 3         | Empty       |  |  |"]
1659    #[doc = "| 4 (Yaw Angle)| Yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).|  | deg |"]
1660    #[doc = "| 5 (Latitude)| Latitude    |  |  |"]
1661    #[doc = "| 6 (Longitude)| Longitude   |  |  |"]
1662    #[doc = "| 7 (Altitude)| Altitude    |  | m |"]
1663    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1664    #[doc = "Land using VTOL mode"]
1665    #[doc = ""]
1666    #[doc = "# Parameters"]
1667    #[doc = ""]
1668    #[doc = "| Parameter | Description | Values | Units |"]
1669    #[doc = "| --------- | ----------- | ------ | ----- |"]
1670    #[doc = "| 1 (Land Options)| Landing behaviour.| [`NavVtolLandOptions`] |  |"]
1671    #[doc = "| 2         | Empty       |  |  |"]
1672    #[doc = "| 3 (Approach Altitude)| Approach altitude (with the same reference as the Altitude field). NaN if unspecified.|  | m |"]
1673    #[doc = "| 4 (Yaw)   | Yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).|  | deg |"]
1674    #[doc = "| 5 (Latitude)| Latitude    |  |  |"]
1675    #[doc = "| 6 (Longitude)| Longitude   |  |  |"]
1676    #[doc = "| 7 (Ground Altitude)| Altitude (ground level) relative to the current coordinate frame. NaN to use system default landing altitude (ignore value).|  | m |"]
1677    MAV_CMD_NAV_VTOL_LAND = 85,
1678    #[doc = "hand control over to an external controller"]
1679    #[doc = ""]
1680    #[doc = "# Parameters"]
1681    #[doc = ""]
1682    #[doc = "| Parameter | Description | Values |"]
1683    #[doc = "| --------- | ----------- | ------ |"]
1684    #[doc = "| 1 (Enable)| On / Off (&gt;0.5f on)| 0, 1 |"]
1685    #[doc = "| 2         | Empty       |  |"]
1686    #[doc = "| 3         | Empty       |  |"]
1687    #[doc = "| 4         | Empty       |  |"]
1688    #[doc = "| 5         | Empty       |  |"]
1689    #[doc = "| 6         | Empty       |  |"]
1690    #[doc = "| 7         | Empty       |  |"]
1691    MAV_CMD_NAV_GUIDED_ENABLE = 92,
1692    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1693    #[doc = ""]
1694    #[doc = "# Parameters"]
1695    #[doc = ""]
1696    #[doc = "| Parameter | Description | Values | Units |"]
1697    #[doc = "| --------- | ----------- | ------ | ----- |"]
1698    #[doc = "| 1 (Delay) | Delay (-1 to enable time-of-day fields)| -1, 0, .. | s |"]
1699    #[doc = "| 2 (Hour)  | hour (24h format, UTC, -1 to ignore)| -1, 0, .. , 23 |  |"]
1700    #[doc = "| 3 (Minute)| minute (24h format, UTC, -1 to ignore)| -1, 0, .. , 59 |  |"]
1701    #[doc = "| 4 (Second)| second (24h format, UTC, -1 to ignore)| -1, 0, .. , 59 |  |"]
1702    #[doc = "| 5         | Empty       |  |  |"]
1703    #[doc = "| 6         | Empty       |  |  |"]
1704    #[doc = "| 7         | Empty       |  |  |"]
1705    MAV_CMD_NAV_DELAY = 93,
1706    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1707    #[doc = ""]
1708    #[doc = "# Parameters"]
1709    #[doc = ""]
1710    #[doc = "| Parameter | Description | Values | Units |"]
1711    #[doc = "| --------- | ----------- | ------ | ----- |"]
1712    #[doc = "| 1 (Max Descent)| Maximum distance to descend.| &ge; 0 | m |"]
1713    #[doc = "| 2         | Empty       |  |  |"]
1714    #[doc = "| 3         | Empty       |  |  |"]
1715    #[doc = "| 4         | Empty       |  |  |"]
1716    #[doc = "| 5 (Latitude)| Latitude    |  |  |"]
1717    #[doc = "| 6 (Longitude)| Longitude   |  |  |"]
1718    #[doc = "| 7 (Altitude)| Altitude    |  | m |"]
1719    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1720    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1721    #[doc = ""]
1722    #[doc = "# Parameters"]
1723    #[doc = ""]
1724    #[doc = "| Parameter | Description |"]
1725    #[doc = "| --------- | ----------- |"]
1726    #[doc = "| 1         | Empty       |"]
1727    #[doc = "| 2         | Empty       |"]
1728    #[doc = "| 3         | Empty       |"]
1729    #[doc = "| 4         | Empty       |"]
1730    #[doc = "| 5         | Empty       |"]
1731    #[doc = "| 6         | Empty       |"]
1732    #[doc = "| 7         | Empty       |"]
1733    MAV_CMD_NAV_LAST = 95,
1734    #[doc = "Delay mission state machine."]
1735    #[doc = ""]
1736    #[doc = "# Parameters"]
1737    #[doc = ""]
1738    #[doc = "| Parameter | Description | Values | Units |"]
1739    #[doc = "| --------- | ----------- | ------ | ----- |"]
1740    #[doc = "| 1 (Delay) | Delay       | &ge; 0 | s |"]
1741    #[doc = "| 2         | Empty       |  |  |"]
1742    #[doc = "| 3         | Empty       |  |  |"]
1743    #[doc = "| 4         | Empty       |  |  |"]
1744    #[doc = "| 5         | Empty       |  |  |"]
1745    #[doc = "| 6         | Empty       |  |  |"]
1746    #[doc = "| 7         | Empty       |  |  |"]
1747    MAV_CMD_CONDITION_DELAY = 112,
1748    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1749    #[doc = ""]
1750    #[doc = "# Parameters"]
1751    #[doc = ""]
1752    #[doc = "| Parameter | Description | Units |"]
1753    #[doc = "| --------- | ----------- | ----- |"]
1754    #[doc = "| 1 (Rate)  | Descent / Ascend rate.| m/s |"]
1755    #[doc = "| 2         | Empty       |  |"]
1756    #[doc = "| 3         | Empty       |  |"]
1757    #[doc = "| 4         | Empty       |  |"]
1758    #[doc = "| 5         | Empty       |  |"]
1759    #[doc = "| 6         | Empty       |  |"]
1760    #[doc = "| 7 (Altitude)| Target Altitude| m |"]
1761    MAV_CMD_CONDITION_CHANGE_ALT = 113,
1762    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1763    #[doc = ""]
1764    #[doc = "# Parameters"]
1765    #[doc = ""]
1766    #[doc = "| Parameter | Description | Values | Units |"]
1767    #[doc = "| --------- | ----------- | ------ | ----- |"]
1768    #[doc = "| 1 (Distance)| Distance.   | &ge; 0 | m |"]
1769    #[doc = "| 2         | Empty       |  |  |"]
1770    #[doc = "| 3         | Empty       |  |  |"]
1771    #[doc = "| 4         | Empty       |  |  |"]
1772    #[doc = "| 5         | Empty       |  |  |"]
1773    #[doc = "| 6         | Empty       |  |  |"]
1774    #[doc = "| 7         | Empty       |  |  |"]
1775    MAV_CMD_CONDITION_DISTANCE = 114,
1776    #[doc = "Reach a certain target angle."]
1777    #[doc = ""]
1778    #[doc = "# Parameters"]
1779    #[doc = ""]
1780    #[doc = "| Parameter | Description | Values | Units |"]
1781    #[doc = "| --------- | ----------- | ------ | ----- |"]
1782    #[doc = "| 1 (Angle) | target angle [0-360]. Absolute angles: 0 is north. Relative angle: 0 is initial yaw. Direction set by param3.| 0 .. 360 | deg |"]
1783    #[doc = "| 2 (Angular Speed)| angular speed| &ge; 0 | deg/s |"]
1784    #[doc = "| 3 (Direction)| direction: -1: counter clockwise, 0: shortest direction, 1: clockwise| -1, 0, 1 |  |"]
1785    #[doc = "| 4 (Relative)| 0: absolute angle, 1: relative offset| 0, 1 |  |"]
1786    #[doc = "| 5         | Empty       |  |  |"]
1787    #[doc = "| 6         | Empty       |  |  |"]
1788    #[doc = "| 7         | Empty       |  |  |"]
1789    MAV_CMD_CONDITION_YAW = 115,
1790    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1791    #[doc = ""]
1792    #[doc = "# Parameters"]
1793    #[doc = ""]
1794    #[doc = "| Parameter | Description |"]
1795    #[doc = "| --------- | ----------- |"]
1796    #[doc = "| 1         | Empty       |"]
1797    #[doc = "| 2         | Empty       |"]
1798    #[doc = "| 3         | Empty       |"]
1799    #[doc = "| 4         | Empty       |"]
1800    #[doc = "| 5         | Empty       |"]
1801    #[doc = "| 6         | Empty       |"]
1802    #[doc = "| 7         | Empty       |"]
1803    MAV_CMD_CONDITION_LAST = 159,
1804    #[doc = "Set system mode."]
1805    #[doc = ""]
1806    #[doc = "# Parameters"]
1807    #[doc = ""]
1808    #[doc = "| Parameter | Description | Values |"]
1809    #[doc = "| --------- | ----------- | ------ |"]
1810    #[doc = "| 1 (Mode)  | Mode        | [`MavMode`] |"]
1811    #[doc = "| 2 (Custom Mode)| Custom mode - this is system specific, please refer to the individual autopilot specifications for details.|  |"]
1812    #[doc = "| 3 (Custom Submode)| Custom sub mode - this is system specific, please refer to the individual autopilot specifications for details.|  |"]
1813    #[doc = "| 4         | Empty       |  |"]
1814    #[doc = "| 5         | Empty       |  |"]
1815    #[doc = "| 6         | Empty       |  |"]
1816    #[doc = "| 7         | Empty       |  |"]
1817    MAV_CMD_DO_SET_MODE = 176,
1818    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
1819    #[doc = ""]
1820    #[doc = "# Parameters"]
1821    #[doc = ""]
1822    #[doc = "| Parameter | Description | Values |"]
1823    #[doc = "| --------- | ----------- | ------ |"]
1824    #[doc = "| 1 (Number)| Sequence number| 0, 1, .. |"]
1825    #[doc = "| 2 (Repeat)| Repeat count| 0, 1, .. |"]
1826    #[doc = "| 3         | Empty       |  |"]
1827    #[doc = "| 4         | Empty       |  |"]
1828    #[doc = "| 5         | Empty       |  |"]
1829    #[doc = "| 6         | Empty       |  |"]
1830    #[doc = "| 7         | Empty       |  |"]
1831    MAV_CMD_DO_JUMP = 177,
1832    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1833    #[doc = ""]
1834    #[doc = "# Parameters"]
1835    #[doc = ""]
1836    #[doc = "| Parameter | Description | Values | Units |"]
1837    #[doc = "| --------- | ----------- | ------ | ----- |"]
1838    #[doc = "| 1 (Speed Type)| Speed type of value set in param2 (such as airspeed, ground speed, and so on)| [`SpeedType`] |  |"]
1839    #[doc = "| 2 (Speed) | Speed (-1 indicates no change, -2 indicates return to default vehicle speed)| &ge; -2 | m/s |"]
1840    #[doc = "| 3 (Throttle)| Throttle (-1 indicates no change, -2 indicates return to default vehicle throttle value)| &ge; -2 | % |"]
1841    #[doc = "| 4         |             | Reserved (use 0) |  |"]
1842    #[doc = "| 5         |             | Reserved (use 0) |  |"]
1843    #[doc = "| 6         |             | Reserved (use 0) |  |"]
1844    #[doc = "| 7         |             | Reserved (use 0) |  |"]
1845    MAV_CMD_DO_CHANGE_SPEED = 178,
1846    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1847    #[doc = ""]
1848    #[doc = "# Parameters"]
1849    #[doc = ""]
1850    #[doc = "| Parameter | Description | Values | Units |"]
1851    #[doc = "| --------- | ----------- | ------ | ----- |"]
1852    #[doc = "| 1 (Use Current)| Use current (1=use current location, 0=use specified location)| 0, 1 |  |"]
1853    #[doc = "| 2 (Roll)  | Roll angle (of surface). Range: -180..180 degrees. NAN or 0 means value not set. 0.01 indicates zero roll.| -180 .. 180 | deg |"]
1854    #[doc = "| 3 (Pitch) | Pitch angle (of surface). Range: -90..90 degrees. NAN or 0 means value not set. 0.01 means zero pitch.| -90 .. 90 | deg |"]
1855    #[doc = "| 4 (Yaw)   | Yaw angle. NaN to use default heading. Range: -180..180 degrees.| -180 .. 180 | deg |"]
1856    #[doc = "| 5 (Latitude)| Latitude    |  |  |"]
1857    #[doc = "| 6 (Longitude)| Longitude   |  |  |"]
1858    #[doc = "| 7 (Altitude)| Altitude    |  | m |"]
1859    MAV_CMD_DO_SET_HOME = 179,
1860    #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1861    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1862    #[doc = ""]
1863    #[doc = "# Parameters"]
1864    #[doc = ""]
1865    #[doc = "| Parameter | Description | Values |"]
1866    #[doc = "| --------- | ----------- | ------ |"]
1867    #[doc = "| 1 (Number)| Parameter number| 0, 1, .. |"]
1868    #[doc = "| 2 (Value) | Parameter value|  |"]
1869    #[doc = "| 3         | Empty       |  |"]
1870    #[doc = "| 4         | Empty       |  |"]
1871    #[doc = "| 5         | Empty       |  |"]
1872    #[doc = "| 6         | Empty       |  |"]
1873    #[doc = "| 7         | Empty       |  |"]
1874    MAV_CMD_DO_SET_PARAMETER = 180,
1875    #[doc = "Set a relay to a condition."]
1876    #[doc = ""]
1877    #[doc = "# Parameters"]
1878    #[doc = ""]
1879    #[doc = "| Parameter | Description | Values |"]
1880    #[doc = "| --------- | ----------- | ------ |"]
1881    #[doc = "| 1 (Instance)| Relay instance number.| 0, 1, .. |"]
1882    #[doc = "| 2 (Setting)| Setting. (1=on, 0=off, others possible depending on system hardware)| 0, 1, .. |"]
1883    #[doc = "| 3         | Empty       |  |"]
1884    #[doc = "| 4         | Empty       |  |"]
1885    #[doc = "| 5         | Empty       |  |"]
1886    #[doc = "| 6         | Empty       |  |"]
1887    #[doc = "| 7         | Empty       |  |"]
1888    MAV_CMD_DO_SET_RELAY = 181,
1889    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1890    #[doc = ""]
1891    #[doc = "# Parameters"]
1892    #[doc = ""]
1893    #[doc = "| Parameter | Description | Values | Units |"]
1894    #[doc = "| --------- | ----------- | ------ | ----- |"]
1895    #[doc = "| 1 (Instance)| Relay instance number.| 0, 1, .. |  |"]
1896    #[doc = "| 2 (Count) | Cycle count.| 1, 2, .. |  |"]
1897    #[doc = "| 3 (Time)  | Cycle time. | &ge; 0 | s |"]
1898    #[doc = "| 4         | Empty       |  |  |"]
1899    #[doc = "| 5         | Empty       |  |  |"]
1900    #[doc = "| 6         | Empty       |  |  |"]
1901    #[doc = "| 7         | Empty       |  |  |"]
1902    MAV_CMD_DO_REPEAT_RELAY = 182,
1903    #[doc = "Set a servo to a desired PWM value."]
1904    #[doc = ""]
1905    #[doc = "# Parameters"]
1906    #[doc = ""]
1907    #[doc = "| Parameter | Description | Values | Units |"]
1908    #[doc = "| --------- | ----------- | ------ | ----- |"]
1909    #[doc = "| 1 (Instance)| Servo instance number.| 0, 1, .. |  |"]
1910    #[doc = "| 2 (PWM)   | Pulse Width Modulation.| 0, 1, .. | us |"]
1911    #[doc = "| 3         | Empty       |  |  |"]
1912    #[doc = "| 4         | Empty       |  |  |"]
1913    #[doc = "| 5         | Empty       |  |  |"]
1914    #[doc = "| 6         | Empty       |  |  |"]
1915    #[doc = "| 7         | Empty       |  |  |"]
1916    MAV_CMD_DO_SET_SERVO = 183,
1917    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1918    #[doc = ""]
1919    #[doc = "# Parameters"]
1920    #[doc = ""]
1921    #[doc = "| Parameter | Description | Values | Units |"]
1922    #[doc = "| --------- | ----------- | ------ | ----- |"]
1923    #[doc = "| 1 (Instance)| Servo instance number.| 0, 1, .. |  |"]
1924    #[doc = "| 2 (PWM)   | Pulse Width Modulation.| 0, 1, .. | us |"]
1925    #[doc = "| 3 (Count) | Cycle count.| 1, 2, .. |  |"]
1926    #[doc = "| 4 (Time)  | Cycle time. | &ge; 0 | s |"]
1927    #[doc = "| 5         | Empty       |  |  |"]
1928    #[doc = "| 6         | Empty       |  |  |"]
1929    #[doc = "| 7         | Empty       |  |  |"]
1930    MAV_CMD_DO_REPEAT_SERVO = 184,
1931    #[doc = "Terminate flight immediately.           Flight termination immediately and irreversibly terminates the current flight, returning the vehicle to ground.           The vehicle will ignore RC or other input until it has been power-cycled.           Termination may trigger safety measures, including: disabling motors and deployment of parachute on multicopters, and setting flight surfaces to initiate a landing pattern on fixed-wing).           On multicopters without a parachute it may trigger a crash landing.           Support for this command can be tested using the protocol bit: MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION.           Support for this command can also be tested by sending the command with param1=0 (&lt;0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1932    #[doc = ""]
1933    #[doc = "# Parameters"]
1934    #[doc = ""]
1935    #[doc = "| Parameter | Description | Values |"]
1936    #[doc = "| --------- | ----------- | ------ |"]
1937    #[doc = "| 1 (Terminate)| Flight termination activated if&gt;0.5. Otherwise not activated and ACK with MAV_RESULT_FAILED.| 0, 1 |"]
1938    #[doc = "| 2         | Empty       |  |"]
1939    #[doc = "| 3         | Empty       |  |"]
1940    #[doc = "| 4         | Empty       |  |"]
1941    #[doc = "| 5         | Empty       |  |"]
1942    #[doc = "| 6         | Empty       |  |"]
1943    #[doc = "| 7         | Empty       |  |"]
1944    MAV_CMD_DO_FLIGHTTERMINATION = 185,
1945    #[doc = "Change altitude set point."]
1946    #[doc = ""]
1947    #[doc = "# Parameters"]
1948    #[doc = ""]
1949    #[doc = "| Parameter | Description | Values | Units |"]
1950    #[doc = "| --------- | ----------- | ------ | ----- |"]
1951    #[doc = "| 1 (Altitude)| Altitude.   |  | m |"]
1952    #[doc = "| 2 (Frame) | Frame of new altitude.| [`MavFrame`] |  |"]
1953    #[doc = "| 3         | Empty       |  |  |"]
1954    #[doc = "| 4         | Empty       |  |  |"]
1955    #[doc = "| 5         | Empty       |  |  |"]
1956    #[doc = "| 6         | Empty       |  |  |"]
1957    #[doc = "| 7         | Empty       |  |  |"]
1958    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1959    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1960    #[doc = ""]
1961    #[doc = "# Parameters"]
1962    #[doc = ""]
1963    #[doc = "| Parameter | Description | Values |"]
1964    #[doc = "| --------- | ----------- | ------ |"]
1965    #[doc = "| 1 (Actuator 1)| Actuator 1 value, scaled from [-1 to 1]. NaN to ignore.| -1 .. 1 |"]
1966    #[doc = "| 2 (Actuator 2)| Actuator 2 value, scaled from [-1 to 1]. NaN to ignore.| -1 .. 1 |"]
1967    #[doc = "| 3 (Actuator 3)| Actuator 3 value, scaled from [-1 to 1]. NaN to ignore.| -1 .. 1 |"]
1968    #[doc = "| 4 (Actuator 4)| Actuator 4 value, scaled from [-1 to 1]. NaN to ignore.| -1 .. 1 |"]
1969    #[doc = "| 5 (Actuator 5)| Actuator 5 value, scaled from [-1 to 1]. NaN to ignore.| -1 .. 1 |"]
1970    #[doc = "| 6 (Actuator 6)| Actuator 6 value, scaled from [-1 to 1]. NaN to ignore.| -1 .. 1 |"]
1971    #[doc = "| 7 (Index) | Index of actuator set (i.e if set to 1, Actuator 1 becomes Actuator 7)| 0, 1, .. |"]
1972    MAV_CMD_DO_SET_ACTUATOR = 187,
1973    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1974    #[doc = ""]
1975    #[doc = "# Parameters"]
1976    #[doc = ""]
1977    #[doc = "| Parameter | Description | Units |"]
1978    #[doc = "| --------- | ----------- | ----- |"]
1979    #[doc = "| 1         | Empty       |  |"]
1980    #[doc = "| 2         | Empty       |  |"]
1981    #[doc = "| 3         | Empty       |  |"]
1982    #[doc = "| 4         | Empty       |  |"]
1983    #[doc = "| 5 (Latitude)| Latitudee. 0: not used.|  |"]
1984    #[doc = "| 6 (Longitude)| Longitudee. 0: not used.|  |"]
1985    #[doc = "| 7 (Altitude)| Altitudee. 0: not used.| m |"]
1986    MAV_CMD_DO_RETURN_PATH_START = 188,
1987    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
1988    #[doc = ""]
1989    #[doc = "# Parameters"]
1990    #[doc = ""]
1991    #[doc = "| Parameter | Description | Units |"]
1992    #[doc = "| --------- | ----------- | ----- |"]
1993    #[doc = "| 1         | Empty       |  |"]
1994    #[doc = "| 2         | Empty       |  |"]
1995    #[doc = "| 3         | Empty       |  |"]
1996    #[doc = "| 4         | Empty       |  |"]
1997    #[doc = "| 5 (Latitude)| Latitude for landing sequence selection, or 0 (see description). Ignored in commands (set 0).|  |"]
1998    #[doc = "| 6 (Longitude)| Longitude for landing sequence selection, or 0 (see description). Ignored in commands (set 0).|  |"]
1999    #[doc = "| 7 (Altitude)| Altitude for landing sequence selection, or 0 (see description). Ignored in commands (set 0).| m |"]
2000    MAV_CMD_DO_LAND_START = 189,
2001    #[doc = "Mission command to perform a landing from a rally point."]
2002    #[doc = ""]
2003    #[doc = "# Parameters"]
2004    #[doc = ""]
2005    #[doc = "| Parameter | Description | Units |"]
2006    #[doc = "| --------- | ----------- | ----- |"]
2007    #[doc = "| 1 (Altitude)| Break altitude| m |"]
2008    #[doc = "| 2 (Speed) | Landing speed| m/s |"]
2009    #[doc = "| 3         | Empty       |  |"]
2010    #[doc = "| 4         | Empty       |  |"]
2011    #[doc = "| 5         | Empty       |  |"]
2012    #[doc = "| 6         | Empty       |  |"]
2013    #[doc = "| 7         | Empty       |  |"]
2014    MAV_CMD_DO_RALLY_LAND = 190,
2015    #[doc = "Mission command to safely abort an autonomous landing."]
2016    #[doc = ""]
2017    #[doc = "# Parameters"]
2018    #[doc = ""]
2019    #[doc = "| Parameter | Description | Units |"]
2020    #[doc = "| --------- | ----------- | ----- |"]
2021    #[doc = "| 1 (Altitude)| Altitude    | m |"]
2022    #[doc = "| 2         | Empty       |  |"]
2023    #[doc = "| 3         | Empty       |  |"]
2024    #[doc = "| 4         | Empty       |  |"]
2025    #[doc = "| 5         | Empty       |  |"]
2026    #[doc = "| 6         | Empty       |  |"]
2027    #[doc = "| 7         | Empty       |  |"]
2028    MAV_CMD_DO_GO_AROUND = 191,
2029    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
2030    #[doc = ""]
2031    #[doc = "# Parameters"]
2032    #[doc = ""]
2033    #[doc = "| Parameter | Description | Values | Units |"]
2034    #[doc = "| --------- | ----------- | ------ | ----- |"]
2035    #[doc = "| 1 (Speed) | Ground speed, less than 0 (-1) for default| &ge; -1 | m/s |"]
2036    #[doc = "| 2 (Bitmask)| Bitmask of option flags.| [`MavDoRepositionFlags`] |  |"]
2037    #[doc = "| 3 (Radius)| Loiter radius for planes. Positive values only, direction is controlled by Yaw value. A value of zero or NaN is ignored.|  | m |"]
2038    #[doc = "| 4 (Yaw)   | Yaw heading. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.). For planes indicates loiter direction (0: clockwise, 1: counter clockwise)|  | rad |"]
2039    #[doc = "| 5 (Latitude)| Latitude    |  |  |"]
2040    #[doc = "| 6 (Longitude)| Longitude   |  |  |"]
2041    #[doc = "| 7 (Altitude)| Altitude    |  | m |"]
2042    MAV_CMD_DO_REPOSITION = 192,
2043    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
2044    #[doc = ""]
2045    #[doc = "# Parameters"]
2046    #[doc = ""]
2047    #[doc = "| Parameter | Description | Values |"]
2048    #[doc = "| --------- | ----------- | ------ |"]
2049    #[doc = "| 1 (Continue)| 0: Pause current mission or reposition command, hold current position. 1: Continue mission. A VTOL capable vehicle should enter hover mode (multicopter and VTOL planes). A plane should loiter with the default loiter radius.| 0, 1 |"]
2050    #[doc = "| 2         | Reserved    |  |"]
2051    #[doc = "| 3         | Reserved    |  |"]
2052    #[doc = "| 4         | Reserved    |  |"]
2053    #[doc = "| 5         | Reserved    |  |"]
2054    #[doc = "| 6         | Reserved    |  |"]
2055    #[doc = "| 7         | Reserved    |  |"]
2056    MAV_CMD_DO_PAUSE_CONTINUE = 193,
2057    #[doc = "Set moving direction to forward or reverse."]
2058    #[doc = ""]
2059    #[doc = "# Parameters"]
2060    #[doc = ""]
2061    #[doc = "| Parameter | Description | Values |"]
2062    #[doc = "| --------- | ----------- | ------ |"]
2063    #[doc = "| 1 (Reverse)| Direction (0=Forward, 1=Reverse)| 0, 1 |"]
2064    #[doc = "| 2         | Empty       |  |"]
2065    #[doc = "| 3         | Empty       |  |"]
2066    #[doc = "| 4         | Empty       |  |"]
2067    #[doc = "| 5         | Empty       |  |"]
2068    #[doc = "| 6         | Empty       |  |"]
2069    #[doc = "| 7         | Empty       |  |"]
2070    MAV_CMD_DO_SET_REVERSE = 194,
2071    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
2072    #[doc = ""]
2073    #[doc = "# Parameters"]
2074    #[doc = ""]
2075    #[doc = "| Parameter | Description | Units |"]
2076    #[doc = "| --------- | ----------- | ----- |"]
2077    #[doc = "| 1 (Gimbal device ID)| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).|  |"]
2078    #[doc = "| 2         | Empty       |  |"]
2079    #[doc = "| 3         | Empty       |  |"]
2080    #[doc = "| 4         | Empty       |  |"]
2081    #[doc = "| 5 (Latitude)| Latitude of ROI location| degE7 |"]
2082    #[doc = "| 6 (Longitude)| Longitude of ROI location| degE7 |"]
2083    #[doc = "| 7 (Altitude)| Altitude of ROI location| m |"]
2084    MAV_CMD_DO_SET_ROI_LOCATION = 195,
2085    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
2086    #[doc = ""]
2087    #[doc = "# Parameters"]
2088    #[doc = ""]
2089    #[doc = "| Parameter | Description | Units |"]
2090    #[doc = "| --------- | ----------- | ----- |"]
2091    #[doc = "| 1 (Gimbal device ID)| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).|  |"]
2092    #[doc = "| 2         | Empty       |  |"]
2093    #[doc = "| 3         | Empty       |  |"]
2094    #[doc = "| 4         | Empty       |  |"]
2095    #[doc = "| 5 (Pitch Offset)| Pitch offset from next waypoint, positive pitching up| deg |"]
2096    #[doc = "| 6 (Roll Offset)| Roll offset from next waypoint, positive rolling to the right| deg |"]
2097    #[doc = "| 7 (Yaw Offset)| Yaw offset from next waypoint, positive yawing to the right| deg |"]
2098    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
2099    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
2100    #[doc = ""]
2101    #[doc = "# Parameters"]
2102    #[doc = ""]
2103    #[doc = "| Parameter | Description |"]
2104    #[doc = "| --------- | ----------- |"]
2105    #[doc = "| 1 (Gimbal device ID)| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).|"]
2106    #[doc = "| 2         | Empty       |"]
2107    #[doc = "| 3         | Empty       |"]
2108    #[doc = "| 4         | Empty       |"]
2109    #[doc = "| 5         | Empty       |"]
2110    #[doc = "| 6         | Empty       |"]
2111    #[doc = "| 7         | Empty       |"]
2112    MAV_CMD_DO_SET_ROI_NONE = 197,
2113    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
2114    #[doc = ""]
2115    #[doc = "# Parameters"]
2116    #[doc = ""]
2117    #[doc = "| Parameter | Description | Values |"]
2118    #[doc = "| --------- | ----------- | ------ |"]
2119    #[doc = "| 1 (System ID)| System ID   | 1, 2, .. , 255 |"]
2120    #[doc = "| 2 (Gimbal device ID)| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).|  |"]
2121    MAV_CMD_DO_SET_ROI_SYSID = 198,
2122    #[doc = "Control onboard camera system."]
2123    #[doc = ""]
2124    #[doc = "# Parameters"]
2125    #[doc = ""]
2126    #[doc = "| Parameter | Description | Values | Units |"]
2127    #[doc = "| --------- | ----------- | ------ | ----- |"]
2128    #[doc = "| 1 (ID)    | Camera ID (-1 for all)| -1, 0, .. |  |"]
2129    #[doc = "| 2 (Transmission)| Transmission: 0: disabled, 1: enabled compressed, 2: enabled raw| 0, 1, 2 |  |"]
2130    #[doc = "| 3 (Interval)| Transmission mode: 0: video stream,&gt;0: single images every n seconds| &ge; 0 | s |"]
2131    #[doc = "| 4 (Recording)| Recording: 0: disabled, 1: enabled compressed, 2: enabled raw| 0, 1, 2 |  |"]
2132    #[doc = "| 5         | Empty       |  |  |"]
2133    #[doc = "| 6         | Empty       |  |  |"]
2134    #[doc = "| 7         | Empty       |  |  |"]
2135    MAV_CMD_DO_CONTROL_VIDEO = 200,
2136    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
2137    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
2138    #[doc = ""]
2139    #[doc = "# Parameters"]
2140    #[doc = ""]
2141    #[doc = "| Parameter | Description | Values |"]
2142    #[doc = "| --------- | ----------- | ------ |"]
2143    #[doc = "| 1 (ROI Mode)| Region of interest mode.| [`MavRoi`] |"]
2144    #[doc = "| 2 (WP Index)| Waypoint index/ target ID (depends on param 1).| 0, 1, .. |"]
2145    #[doc = "| 3 (ROI Index)| Region of interest index. (allows a vehicle to manage multiple ROI's)| 0, 1, .. |"]
2146    #[doc = "| 4         | Empty       |  |"]
2147    #[doc = "| 5         | MAV_ROI_WPNEXT: pitch offset from next waypoint, MAV_ROI_LOCATION: latitude|  |"]
2148    #[doc = "| 6         | MAV_ROI_WPNEXT: roll offset from next waypoint, MAV_ROI_LOCATION: longitude|  |"]
2149    #[doc = "| 7         | MAV_ROI_WPNEXT: yaw offset from next waypoint, MAV_ROI_LOCATION: altitude|  |"]
2150    MAV_CMD_DO_SET_ROI = 201,
2151    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
2152    #[doc = ""]
2153    #[doc = "# Parameters"]
2154    #[doc = ""]
2155    #[doc = "| Parameter | Description | Values | Units |"]
2156    #[doc = "| --------- | ----------- | ------ | ----- |"]
2157    #[doc = "| 1 (Mode)  | Modes: P, TV, AV, M, Etc.| 0, 1, .. |  |"]
2158    #[doc = "| 2 (Shutter Speed)| Shutter speed: Divisor number for one second.| 0, 1, .. |  |"]
2159    #[doc = "| 3 (Aperture)| Aperture: F stop number.| &ge; 0 |  |"]
2160    #[doc = "| 4 (ISO)   | ISO number e.g. 80, 100, 200, Etc.| 0, 1, .. |  |"]
2161    #[doc = "| 5 (Exposure)| Exposure type enumerator.|  |  |"]
2162    #[doc = "| 6 (Command Identity)| Command Identity.|  |  |"]
2163    #[doc = "| 7 (Engine Cut-off)| Main engine cut-off time before camera trigger. (0 means no cut-off)| 0, 1, .. | ds |"]
2164    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
2165    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
2166    #[doc = ""]
2167    #[doc = "# Parameters"]
2168    #[doc = ""]
2169    #[doc = "| Parameter | Description |"]
2170    #[doc = "| --------- | ----------- |"]
2171    #[doc = "| 1 (Session Control)| Session control e.g. show/hide lens|"]
2172    #[doc = "| 2 (Zoom Absolute)| Zoom's absolute position|"]
2173    #[doc = "| 3 (Zoom Relative)| Zooming step value to offset zoom from the current position|"]
2174    #[doc = "| 4 (Focus) | Focus Locking, Unlocking or Re-locking|"]
2175    #[doc = "| 5 (Shoot Command)| Shooting Command|"]
2176    #[doc = "| 6 (Command Identity)| Command Identity|"]
2177    #[doc = "| 7 (Shot ID)| Test shot identifier. If set to 1, image will only be captured, but not counted towards internal frame count.|"]
2178    MAV_CMD_DO_DIGICAM_CONTROL = 203,
2179    #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
2180    #[doc = "Mission command to configure a camera or antenna mount"]
2181    #[doc = ""]
2182    #[doc = "# Parameters"]
2183    #[doc = ""]
2184    #[doc = "| Parameter | Description | Values |"]
2185    #[doc = "| --------- | ----------- | ------ |"]
2186    #[doc = "| 1 (Mode)  | Mount operation mode| [`MavMountMode`] |"]
2187    #[doc = "| 2 (Stabilize Roll)| stabilize roll? (1 = yes, 0 = no)| 0, 1 |"]
2188    #[doc = "| 3 (Stabilize Pitch)| stabilize pitch? (1 = yes, 0 = no)| 0, 1 |"]
2189    #[doc = "| 4 (Stabilize Yaw)| stabilize yaw? (1 = yes, 0 = no)| 0, 1 |"]
2190    #[doc = "| 5 (Roll Input Mode)| roll input (0 = angle body frame, 1 = angular rate, 2 = angle absolute frame)|  |"]
2191    #[doc = "| 6 (Pitch Input Mode)| pitch input (0 = angle body frame, 1 = angular rate, 2 = angle absolute frame)|  |"]
2192    #[doc = "| 7 (Yaw Input Mode)| yaw input (0 = angle body frame, 1 = angular rate, 2 = angle absolute frame)|  |"]
2193    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
2194    #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
2195    #[doc = "Mission command to control a camera or antenna mount"]
2196    #[doc = ""]
2197    #[doc = "# Parameters"]
2198    #[doc = ""]
2199    #[doc = "| Parameter | Description | Values | Units |"]
2200    #[doc = "| --------- | ----------- | ------ | ----- |"]
2201    #[doc = "| 1 (Pitch) | pitch depending on mount mode (degrees or degrees/second depending on pitch input).|  |  |"]
2202    #[doc = "| 2 (Roll)  | roll depending on mount mode (degrees or degrees/second depending on roll input).|  |  |"]
2203    #[doc = "| 3 (Yaw)   | yaw depending on mount mode (degrees or degrees/second depending on yaw input).|  |  |"]
2204    #[doc = "| 4 (Altitude)| altitude depending on mount mode.|  | m |"]
2205    #[doc = "| 5 (Latitude)| latitude, set if appropriate mount mode.|  |  |"]
2206    #[doc = "| 6 (Longitude)| longitude, set if appropriate mount mode.|  |  |"]
2207    #[doc = "| 7 (Mode)  | Mount mode. | [`MavMountMode`] |  |"]
2208    MAV_CMD_DO_MOUNT_CONTROL = 205,
2209    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
2210    #[doc = ""]
2211    #[doc = "# Parameters"]
2212    #[doc = ""]
2213    #[doc = "| Parameter | Description | Values | Units |"]
2214    #[doc = "| --------- | ----------- | ------ | ----- |"]
2215    #[doc = "| 1 (Distance)| Camera trigger distance. 0 to stop triggering.| &ge; 0 | m |"]
2216    #[doc = "| 2 (Shutter)| Camera shutter integration time. -1 or 0 to ignore| -1, 0, .. | ms |"]
2217    #[doc = "| 3 (Trigger)| Trigger camera once immediately. (0 = no trigger, 1 = trigger)| 0, 1 |  |"]
2218    #[doc = "| 4 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |  |"]
2219    #[doc = "| 5         | Empty       |  |  |"]
2220    #[doc = "| 6         | Empty       |  |  |"]
2221    #[doc = "| 7         | Empty       |  |  |"]
2222    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
2223    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
2224    #[doc = ""]
2225    #[doc = "# Parameters"]
2226    #[doc = ""]
2227    #[doc = "| Parameter | Description | Values |"]
2228    #[doc = "| --------- | ----------- | ------ |"]
2229    #[doc = "| 1 (Enable)| enable? (0=disable, 1=enable, 2=disable_floor_only)| 0, 1, 2 |"]
2230    #[doc = "| 2 (Types) | Fence types to enable or disable as a bitmask. 0: field is unused/all fences should be enabled or disabled (for compatiblity reasons). Parameter is ignored if param1=2.| [`FenceType`] |"]
2231    #[doc = "| 3         | Empty       |  |"]
2232    #[doc = "| 4         | Empty       |  |"]
2233    #[doc = "| 5         | Empty       |  |"]
2234    #[doc = "| 6         | Empty       |  |"]
2235    #[doc = "| 7         | Empty       |  |"]
2236    MAV_CMD_DO_FENCE_ENABLE = 207,
2237    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
2238    #[doc = ""]
2239    #[doc = "# Parameters"]
2240    #[doc = ""]
2241    #[doc = "| Parameter | Description | Values |"]
2242    #[doc = "| --------- | ----------- | ------ |"]
2243    #[doc = "| 1 (Action)| Action      | [`ParachuteAction`] |"]
2244    #[doc = "| 2         | Empty       |  |"]
2245    #[doc = "| 3         | Empty       |  |"]
2246    #[doc = "| 4         | Empty       |  |"]
2247    #[doc = "| 5         | Empty       |  |"]
2248    #[doc = "| 6         | Empty       |  |"]
2249    #[doc = "| 7         | Empty       |  |"]
2250    MAV_CMD_DO_PARACHUTE = 208,
2251    #[doc = "Command to perform motor test."]
2252    #[doc = ""]
2253    #[doc = "# Parameters"]
2254    #[doc = ""]
2255    #[doc = "| Parameter | Description | Values | Units |"]
2256    #[doc = "| --------- | ----------- | ------ | ----- |"]
2257    #[doc = "| 1 (Instance)| Motor instance number (from 1 to max number of motors on the vehicle).| 1, 2, .. |  |"]
2258    #[doc = "| 2 (Throttle Type)| Throttle type (whether the Throttle Value in param3 is a percentage, PWM value, etc.)| [`MotorTestThrottleType`] |  |"]
2259    #[doc = "| 3 (Throttle)| Throttle value.|  |  |"]
2260    #[doc = "| 4 (Timeout)| Timeout between tests that are run in sequence.| &ge; 0 | s |"]
2261    #[doc = "| 5 (Motor Count)| Motor count. Number of motors to test in sequence: 0/1=one motor, 2= two motors, etc. The Timeout (param4) is used between tests.| 0, 1, .. |  |"]
2262    #[doc = "| 6 (Test Order)| Motor test order.| [`MotorTestOrder`] |  |"]
2263    #[doc = "| 7         | Empty       |  |  |"]
2264    MAV_CMD_DO_MOTOR_TEST = 209,
2265    #[doc = "Change to/from inverted flight."]
2266    #[doc = ""]
2267    #[doc = "# Parameters"]
2268    #[doc = ""]
2269    #[doc = "| Parameter | Description | Values |"]
2270    #[doc = "| --------- | ----------- | ------ |"]
2271    #[doc = "| 1 (Inverted)| Inverted flight. (0=normal, 1=inverted)| 0, 1 |"]
2272    #[doc = "| 2         | Empty       |  |"]
2273    #[doc = "| 3         | Empty       |  |"]
2274    #[doc = "| 4         | Empty       |  |"]
2275    #[doc = "| 5         | Empty       |  |"]
2276    #[doc = "| 6         | Empty       |  |"]
2277    #[doc = "| 7         | Empty       |  |"]
2278    MAV_CMD_DO_INVERTED_FLIGHT = 210,
2279    #[doc = "Mission command to operate a gripper."]
2280    #[doc = ""]
2281    #[doc = "# Parameters"]
2282    #[doc = ""]
2283    #[doc = "| Parameter | Description | Values |"]
2284    #[doc = "| --------- | ----------- | ------ |"]
2285    #[doc = "| 1 (Instance)| Gripper instance number.| 1, 2, .. |"]
2286    #[doc = "| 2 (Action)| Gripper action to perform.| [`GripperActions`] |"]
2287    #[doc = "| 3         | Empty       |  |"]
2288    #[doc = "| 4         | Empty       |  |"]
2289    #[doc = "| 5         | Empty       |  |"]
2290    #[doc = "| 6         | Empty       |  |"]
2291    #[doc = "| 7         | Empty       |  |"]
2292    MAV_CMD_DO_GRIPPER = 211,
2293    #[doc = "Enable/disable autotune."]
2294    #[doc = ""]
2295    #[doc = "# Parameters"]
2296    #[doc = ""]
2297    #[doc = "| Parameter | Description | Values |"]
2298    #[doc = "| --------- | ----------- | ------ |"]
2299    #[doc = "| 1 (Enable)| Enable (1: enable, 0:disable).| 0, 1 |"]
2300    #[doc = "| 2 (Axis)  | Specify axes for which autotuning is enabled/disabled. 0 indicates the field is unused (for compatiblity reasons). If 0 the autopilot will follow its default behaviour, which is usually to tune all axes.| [`AutotuneAxis`] |"]
2301    #[doc = "| 3         | Empty.      |  |"]
2302    #[doc = "| 4         | Empty.      |  |"]
2303    #[doc = "| 5         | Empty.      |  |"]
2304    #[doc = "| 6         | Empty.      |  |"]
2305    #[doc = "| 7         | Empty.      |  |"]
2306    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
2307    #[doc = "Sets a desired vehicle turn angle and speed change."]
2308    #[doc = ""]
2309    #[doc = "# Parameters"]
2310    #[doc = ""]
2311    #[doc = "| Parameter | Description | Values | Units |"]
2312    #[doc = "| --------- | ----------- | ------ | ----- |"]
2313    #[doc = "| 1 (Yaw)   | Yaw angle to adjust steering by.|  | deg |"]
2314    #[doc = "| 2 (Speed) | Speed.      |  | m/s |"]
2315    #[doc = "| 3 (Angle) | Final angle. (0=absolute, 1=relative)| 0, 1 |  |"]
2316    #[doc = "| 4         | Empty       |  |  |"]
2317    #[doc = "| 5         | Empty       |  |  |"]
2318    #[doc = "| 6         | Empty       |  |  |"]
2319    #[doc = "| 7         | Empty       |  |  |"]
2320    MAV_CMD_NAV_SET_YAW_SPEED = 213,
2321    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
2322    #[doc = ""]
2323    #[doc = "# Parameters"]
2324    #[doc = ""]
2325    #[doc = "| Parameter | Description | Values | Units |"]
2326    #[doc = "| --------- | ----------- | ------ | ----- |"]
2327    #[doc = "| 1 (Trigger Cycle)| Camera trigger cycle time. -1 or 0 to ignore.| -1, 0, .. | ms |"]
2328    #[doc = "| 2 (Shutter Integration)| Camera shutter integration time. Should be less than trigger cycle time. -1 or 0 to ignore.| -1, 0, .. | ms |"]
2329    #[doc = "| 3 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |  |"]
2330    #[doc = "| 4         | Empty       |  |  |"]
2331    #[doc = "| 5         | Empty       |  |  |"]
2332    #[doc = "| 6         | Empty       |  |  |"]
2333    #[doc = "| 7         | Empty       |  |  |"]
2334    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
2335    #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
2336    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
2337    #[doc = ""]
2338    #[doc = "# Parameters"]
2339    #[doc = ""]
2340    #[doc = "| Parameter | Description |"]
2341    #[doc = "| --------- | ----------- |"]
2342    #[doc = "| 1 (Q1)    | quaternion param q1, w (1 in null-rotation)|"]
2343    #[doc = "| 2 (Q2)    | quaternion param q2, x (0 in null-rotation)|"]
2344    #[doc = "| 3 (Q3)    | quaternion param q3, y (0 in null-rotation)|"]
2345    #[doc = "| 4 (Q4)    | quaternion param q4, z (0 in null-rotation)|"]
2346    #[doc = "| 5         | Empty       |"]
2347    #[doc = "| 6         | Empty       |"]
2348    #[doc = "| 7         | Empty       |"]
2349    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
2350    #[doc = "set id of master controller"]
2351    #[doc = ""]
2352    #[doc = "# Parameters"]
2353    #[doc = ""]
2354    #[doc = "| Parameter | Description | Values |"]
2355    #[doc = "| --------- | ----------- | ------ |"]
2356    #[doc = "| 1 (System ID)| System ID   | 0, 1, .. , 255 |"]
2357    #[doc = "| 2 (Component ID)| Component ID| 0, 1, .. , 255 |"]
2358    #[doc = "| 3         | Empty       |  |"]
2359    #[doc = "| 4         | Empty       |  |"]
2360    #[doc = "| 5         | Empty       |  |"]
2361    #[doc = "| 6         | Empty       |  |"]
2362    #[doc = "| 7         | Empty       |  |"]
2363    MAV_CMD_DO_GUIDED_MASTER = 221,
2364    #[doc = "Set limits for external control"]
2365    #[doc = ""]
2366    #[doc = "# Parameters"]
2367    #[doc = ""]
2368    #[doc = "| Parameter | Description | Values | Units |"]
2369    #[doc = "| --------- | ----------- | ------ | ----- |"]
2370    #[doc = "| 1 (Timeout)| Timeout - maximum time that external controller will be allowed to control vehicle. 0 means no timeout.| &ge; 0 | s |"]
2371    #[doc = "| 2 (Min Altitude)| Altitude (MSL) min - if vehicle moves below this alt, the command will be aborted and the mission will continue. 0 means no lower altitude limit.|  | m |"]
2372    #[doc = "| 3 (Max Altitude)| Altitude (MSL) max - if vehicle moves above this alt, the command will be aborted and the mission will continue. 0 means no upper altitude limit.|  | m |"]
2373    #[doc = "| 4 (Horiz. Move Limit)| Horizontal move limit - if vehicle moves more than this distance from its location at the moment the command was executed, the command will be aborted and the mission will continue. 0 means no horizontal move limit.| &ge; 0 | m |"]
2374    #[doc = "| 5         | Empty       |  |  |"]
2375    #[doc = "| 6         | Empty       |  |  |"]
2376    #[doc = "| 7         | Empty       |  |  |"]
2377    MAV_CMD_DO_GUIDED_LIMITS = 222,
2378    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
2379    #[doc = ""]
2380    #[doc = "# Parameters"]
2381    #[doc = ""]
2382    #[doc = "| Parameter | Description | Values | Units |"]
2383    #[doc = "| --------- | ----------- | ------ | ----- |"]
2384    #[doc = "| 1 (Start Engine)| 0: Stop engine, 1:Start Engine| 0, 1 |  |"]
2385    #[doc = "| 2 (Cold Start)| 0: Warm start, 1:Cold start. Controls use of choke where applicable| 0, 1 |  |"]
2386    #[doc = "| 3 (Height Delay)| Height delay. This is for commanding engine start only after the vehicle has gained the specified height. Used in VTOL vehicles during takeoff to start engine after the aircraft is off the ground. Zero for no delay.| &ge; 0 | m |"]
2387    #[doc = "| 4         | Empty       |  |  |"]
2388    #[doc = "| 5         | Empty       |  |  |"]
2389    #[doc = "| 6         | Empty       |  |  |"]
2390    #[doc = "| 7         | Empty       |  |  |"]
2391    MAV_CMD_DO_ENGINE_CONTROL = 223,
2392    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
2393    #[doc = ""]
2394    #[doc = "# Parameters"]
2395    #[doc = ""]
2396    #[doc = "| Parameter | Description | Values |"]
2397    #[doc = "| --------- | ----------- | ------ |"]
2398    #[doc = "| 1 (Number)| Mission sequence value to set. -1 for the current mission item (use to reset mission without changing current mission item).| -1, 0, .. |"]
2399    #[doc = "| 2 (Reset Mission)| Resets mission. 1: true, 0: false. Resets jump counters to initial values and changes mission state \"completed\" to be \"active\" or \"paused\".| 0, 1 |"]
2400    #[doc = "| 3         | Empty       |  |"]
2401    #[doc = "| 4         | Empty       |  |"]
2402    #[doc = "| 5         | Empty       |  |"]
2403    #[doc = "| 6         | Empty       |  |"]
2404    #[doc = "| 7         | Empty       |  |"]
2405    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
2406    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
2407    #[doc = ""]
2408    #[doc = "# Parameters"]
2409    #[doc = ""]
2410    #[doc = "| Parameter | Description |"]
2411    #[doc = "| --------- | ----------- |"]
2412    #[doc = "| 1         | Empty       |"]
2413    #[doc = "| 2         | Empty       |"]
2414    #[doc = "| 3         | Empty       |"]
2415    #[doc = "| 4         | Empty       |"]
2416    #[doc = "| 5         | Empty       |"]
2417    #[doc = "| 6         | Empty       |"]
2418    #[doc = "| 7         | Empty       |"]
2419    MAV_CMD_DO_LAST = 240,
2420    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
2421    #[doc = ""]
2422    #[doc = "# Parameters"]
2423    #[doc = ""]
2424    #[doc = "| Parameter | Description | Values |"]
2425    #[doc = "| --------- | ----------- | ------ |"]
2426    #[doc = "| 1 (Gyro Temperature)| 1: gyro calibration, 3: gyro temperature calibration| 0, 1, .. , 3 |"]
2427    #[doc = "| 2 (Magnetometer)| 1: magnetometer calibration| 0, 1 |"]
2428    #[doc = "| 3 (Ground Pressure)| 1: ground pressure calibration| 0, 1 |"]
2429    #[doc = "| 4 (Remote Control)| 1: radio RC calibration, 2: RC trim calibration| 0, 1 |"]
2430    #[doc = "| 5 (Accelerometer)| 1: accelerometer calibration, 2: board level calibration, 3: accelerometer temperature calibration, 4: simple accelerometer calibration| 0, 1, .. , 4 |"]
2431    #[doc = "| 6 (Compmot or Airspeed)| 1: APM: compass/motor interference calibration (PX4: airspeed calibration, deprecated), 2: airspeed calibration| 0, 1, 2 |"]
2432    #[doc = "| 7 (ESC or Baro)| 1: ESC calibration, 3: barometer temperature calibration| 0, 1, .. , 3 |"]
2433    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
2434    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
2435    #[doc = ""]
2436    #[doc = "# Parameters"]
2437    #[doc = ""]
2438    #[doc = "| Parameter | Description | Values |"]
2439    #[doc = "| --------- | ----------- | ------ |"]
2440    #[doc = "| 1 (Sensor Type)| Sensor to adjust the offsets for: 0: gyros, 1: accelerometer, 2: magnetometer, 3: barometer, 4: optical flow, 5: second magnetometer, 6: third magnetometer| 0, 1, .. , 6 |"]
2441    #[doc = "| 2 (X Offset)| X axis offset (or generic dimension 1), in the sensor's raw units|  |"]
2442    #[doc = "| 3 (Y Offset)| Y axis offset (or generic dimension 2), in the sensor's raw units|  |"]
2443    #[doc = "| 4 (Z Offset)| Z axis offset (or generic dimension 3), in the sensor's raw units|  |"]
2444    #[doc = "| 5 (4th Dimension)| Generic dimension 4, in the sensor's raw units|  |"]
2445    #[doc = "| 6 (5th Dimension)| Generic dimension 5, in the sensor's raw units|  |"]
2446    #[doc = "| 7 (6th Dimension)| Generic dimension 6, in the sensor's raw units|  |"]
2447    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
2448    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
2449    #[doc = ""]
2450    #[doc = "# Parameters"]
2451    #[doc = ""]
2452    #[doc = "| Parameter | Description |"]
2453    #[doc = "| --------- | ----------- |"]
2454    #[doc = "| 1 (Actuator ID)| 1: Trigger actuator ID assignment and direction mapping. 0: Cancel command.|"]
2455    #[doc = "| 2         | Reserved    |"]
2456    #[doc = "| 3         | Reserved    |"]
2457    #[doc = "| 4         | Reserved    |"]
2458    #[doc = "| 5         | Reserved    |"]
2459    #[doc = "| 6         | Reserved    |"]
2460    #[doc = "| 7         | Reserved    |"]
2461    MAV_CMD_PREFLIGHT_UAVCAN = 243,
2462    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
2463    #[doc = ""]
2464    #[doc = "# Parameters"]
2465    #[doc = ""]
2466    #[doc = "| Parameter | Description | Values | Units |"]
2467    #[doc = "| --------- | ----------- | ------ | ----- |"]
2468    #[doc = "| 1 (Parameter Storage)| Action to perform on the persistent parameter storage| [`PreflightStorageParameterAction`] |  |"]
2469    #[doc = "| 2 (Mission Storage)| Action to perform on the persistent mission storage| [`PreflightStorageMissionAction`] |  |"]
2470    #[doc = "| 3 (Logging Rate)| Onboard logging: 0: Ignore, 1: Start default rate logging, -1: Stop logging,&gt;1: logging rate (e.g. set to 1000 for 1000 Hz logging)| -1, 0, .. | Hz |"]
2471    #[doc = "| 4         | Reserved    |  |  |"]
2472    #[doc = "| 5         | Empty       |  |  |"]
2473    #[doc = "| 6         | Empty       |  |  |"]
2474    #[doc = "| 7         | Empty       |  |  |"]
2475    MAV_CMD_PREFLIGHT_STORAGE = 245,
2476    #[doc = "Request the reboot or shutdown of system components."]
2477    #[doc = ""]
2478    #[doc = "# Parameters"]
2479    #[doc = ""]
2480    #[doc = "| Parameter | Description | Values |"]
2481    #[doc = "| --------- | ----------- | ------ |"]
2482    #[doc = "| 1 (Autopilot)| 0: Do nothing for autopilot, 1: Reboot autopilot, 2: Shutdown autopilot, 3: Reboot autopilot and keep it in the bootloader until upgraded.| 0, 1, .. , 3 |"]
2483    #[doc = "| 2 (Companion)| 0: Do nothing for onboard computer, 1: Reboot onboard computer, 2: Shutdown onboard computer, 3: Reboot onboard computer and keep it in the bootloader until upgraded.| 0, 1, .. , 3 |"]
2484    #[doc = "| 3 (Component action)| 0: Do nothing for component, 1: Reboot component, 2: Shutdown component, 3: Reboot component and keep it in the bootloader until upgraded| 0, 1, .. , 3 |"]
2485    #[doc = "| 4 (Component ID)| MAVLink Component ID targeted in param3 (0 for all components).| 0, 1, .. , 255 |"]
2486    #[doc = "| 5         | Reserved (set to 0)|  |"]
2487    #[doc = "| 6 (Conditions)| Conditions under which reboot/shutdown is allowed.| [`RebootShutdownConditions`] |"]
2488    #[doc = "| 7         | WIP: ID (e.g. camera ID -1 for all IDs)|  |"]
2489    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
2490    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
2491    #[doc = ""]
2492    #[doc = "# Parameters"]
2493    #[doc = ""]
2494    #[doc = "| Parameter | Description | Values | Units |"]
2495    #[doc = "| --------- | ----------- | ------ | ----- |"]
2496    #[doc = "| 1 (Continue)| MAV_GOTO_DO_HOLD: pause mission and either hold or move to specified position (depending on param2), MAV_GOTO_DO_CONTINUE: resume mission.| [`MavGoto`] |  |"]
2497    #[doc = "| 2 (Position)| MAV_GOTO_HOLD_AT_CURRENT_POSITION: hold at current position, MAV_GOTO_HOLD_AT_SPECIFIED_POSITION: hold at specified position.| [`MavGoto`] |  |"]
2498    #[doc = "| 3 (Frame) | Coordinate frame of hold point.| [`MavFrame`] |  |"]
2499    #[doc = "| 4 (Yaw)   | Desired yaw angle.|  | deg |"]
2500    #[doc = "| 5 (Latitude/X)| Latitude/X position.|  |  |"]
2501    #[doc = "| 6 (Longitude/Y)| Longitude/Y position.|  |  |"]
2502    #[doc = "| 7 (Altitude/Z)| Altitude/Z position.|  |  |"]
2503    MAV_CMD_OVERRIDE_GOTO = 252,
2504    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
2505    #[doc = ""]
2506    #[doc = "# Parameters"]
2507    #[doc = ""]
2508    #[doc = "| Parameter | Description | Values | Units |"]
2509    #[doc = "| --------- | ----------- | ------ | ----- |"]
2510    #[doc = "| 1 (Distance)| Camera trigger distance. 0 to stop triggering.| &ge; 0 | m |"]
2511    #[doc = "| 2 (Shutter)| Camera shutter integration time. 0 to ignore| 0, 1, .. | ms |"]
2512    #[doc = "| 3 (Min Interval)| The minimum interval in which the camera is capable of taking subsequent pictures repeatedly. 0 to ignore.| 0, 1, .. , 10000 | ms |"]
2513    #[doc = "| 4 (Positions)| Total number of roll positions at which the camera will capture photos (images captures spread evenly across the limits defined by param5).| 2, 3, .. |  |"]
2514    #[doc = "| 5 (Roll Angle)| Angle limits that the camera can be rolled to left and right of center.| &ge; 0 | deg |"]
2515    #[doc = "| 6 (Pitch Angle)| Fixed pitch angle that the camera will hold in oblique mode if the mount is actuated in the pitch axis.| -180 .. 180 | deg |"]
2516    #[doc = "| 7         | Empty       |  |  |"]
2517    MAV_CMD_OBLIQUE_SURVEY = 260,
2518    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
2519    #[doc = ""]
2520    #[doc = "# Parameters"]
2521    #[doc = ""]
2522    #[doc = "| Parameter | Description | Values |"]
2523    #[doc = "| --------- | ----------- | ------ |"]
2524    #[doc = "| 1 (Standard Mode)| The mode to set.| [`MavStandardMode`] |"]
2525    #[doc = "| 2         |             | Reserved (use 0) |"]
2526    #[doc = "| 3         |             | Reserved (use 0) |"]
2527    #[doc = "| 4         |             | Reserved (use 0) |"]
2528    #[doc = "| 5         |             | Reserved (use 0) |"]
2529    #[doc = "| 6         |             | Reserved (use 0) |"]
2530    #[doc = "| 7         |             | Reserved (use NaN) |"]
2531    MAV_CMD_DO_SET_STANDARD_MODE = 262,
2532    #[doc = "start running a mission"]
2533    #[doc = ""]
2534    #[doc = "# Parameters"]
2535    #[doc = ""]
2536    #[doc = "| Parameter | Description | Values |"]
2537    #[doc = "| --------- | ----------- | ------ |"]
2538    #[doc = "| 1 (First Item)| first_item: the first mission item to run| 0, 1, .. |"]
2539    #[doc = "| 2 (Last Item)| last_item:  the last mission item to run (after this item is run, the mission ends)| 0, 1, .. |"]
2540    MAV_CMD_MISSION_START = 300,
2541    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
2542    #[doc = ""]
2543    #[doc = "# Parameters"]
2544    #[doc = ""]
2545    #[doc = "| Parameter | Description | Values | Units |"]
2546    #[doc = "| --------- | ----------- | ------ | ----- |"]
2547    #[doc = "| 1 (Value) | Output value: 1 means maximum positive output, 0 to center servos or minimum motor thrust (expected to spin), -1 for maximum negative (if not supported by the motors, i.e. motor is not reversible, smaller than 0 maps to NaN). And NaN maps to disarmed (stop the motors).| -1 .. 1 |  |"]
2548    #[doc = "| 2 (Timeout)| Timeout after which the test command expires and the output is restored to the previous value. A timeout has to be set for safety reasons. A timeout of 0 means to restore the previous value immediately.| 0 .. 3 | s |"]
2549    #[doc = "| 3         |             | Reserved (use 0) |  |"]
2550    #[doc = "| 4         |             | Reserved (use 0) |  |"]
2551    #[doc = "| 5 (Output Function)| Actuator Output function| [`ActuatorOutputFunction`] |  |"]
2552    #[doc = "| 6         |             | Reserved (use 0) |  |"]
2553    #[doc = "| 7         |             | Reserved (use 0) |  |"]
2554    MAV_CMD_ACTUATOR_TEST = 310,
2555    #[doc = "Actuator configuration command."]
2556    #[doc = ""]
2557    #[doc = "# Parameters"]
2558    #[doc = ""]
2559    #[doc = "| Parameter | Description | Values |"]
2560    #[doc = "| --------- | ----------- | ------ |"]
2561    #[doc = "| 1 (Configuration)| Actuator configuration action| [`ActuatorConfiguration`] |"]
2562    #[doc = "| 2         |             | Reserved (use 0) |"]
2563    #[doc = "| 3         |             | Reserved (use 0) |"]
2564    #[doc = "| 4         |             | Reserved (use 0) |"]
2565    #[doc = "| 5 (Output Function)| Actuator Output function| [`ActuatorOutputFunction`] |"]
2566    #[doc = "| 6         |             | Reserved (use 0) |"]
2567    #[doc = "| 7         |             | Reserved (use 0) |"]
2568    MAV_CMD_CONFIGURE_ACTUATOR = 311,
2569    #[doc = "Arms / Disarms a component"]
2570    #[doc = ""]
2571    #[doc = "# Parameters"]
2572    #[doc = ""]
2573    #[doc = "| Parameter | Description | Values |"]
2574    #[doc = "| --------- | ----------- | ------ |"]
2575    #[doc = "| 1 (Arm)   | 0: disarm, 1: arm| 0, 1 |"]
2576    #[doc = "| 2 (Force) | 0: arm-disarm unless prevented by safety checks (i.e. when landed), 21196: force arming/disarming (e.g. allow arming to override preflight checks and disarming in flight)| 0, 21196 |"]
2577    MAV_CMD_COMPONENT_ARM_DISARM = 400,
2578    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
2579    MAV_CMD_RUN_PREARM_CHECKS = 401,
2580    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
2581    #[doc = ""]
2582    #[doc = "# Parameters"]
2583    #[doc = ""]
2584    #[doc = "| Parameter | Description | Values |"]
2585    #[doc = "| --------- | ----------- | ------ |"]
2586    #[doc = "| 1 (Enable)| 0: Illuminators OFF, 1: Illuminators ON| 0, 1 |"]
2587    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
2588    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
2589    #[doc = ""]
2590    #[doc = "# Parameters"]
2591    #[doc = ""]
2592    #[doc = "| Parameter | Description | Values | Units |"]
2593    #[doc = "| --------- | ----------- | ------ | ----- |"]
2594    #[doc = "| 1 (Mode)  | Mode        | [`IlluminatorMode`] |  |"]
2595    #[doc = "| 2 (Brightness)| 0%: Off, 100%: Max Brightness| 0 .. 100 | % |"]
2596    #[doc = "| 3 (Strobe Period)| Strobe period in seconds where 0 means strobing is not used| &ge; 0 | s |"]
2597    #[doc = "| 4 (Strobe Duty)| Strobe duty cycle where 100% means it is on constantly and 0 means strobing is not used| 0 .. 100 | % |"]
2598    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
2599    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
2600    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
2601    #[doc = ""]
2602    #[doc = "# Parameters"]
2603    #[doc = ""]
2604    #[doc = "| Parameter | Description |"]
2605    #[doc = "| --------- | ----------- |"]
2606    #[doc = "| 1         | Reserved    |"]
2607    #[doc = "| 2         | Reserved    |"]
2608    #[doc = "| 3         | Reserved    |"]
2609    #[doc = "| 4         | Reserved    |"]
2610    #[doc = "| 5         | Reserved    |"]
2611    #[doc = "| 6         | Reserved    |"]
2612    #[doc = "| 7         | Reserved    |"]
2613    MAV_CMD_GET_HOME_POSITION = 410,
2614    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
2615    #[doc = ""]
2616    #[doc = "# Parameters"]
2617    #[doc = ""]
2618    #[doc = "| Parameter | Description | Values |"]
2619    #[doc = "| --------- | ----------- | ------ |"]
2620    #[doc = "| 1 (Failure unit)| The unit which is affected by the failure.| [`FailureUnit`] |"]
2621    #[doc = "| 2 (Failure type)| The type how the failure manifests itself.| [`FailureType`] |"]
2622    #[doc = "| 3 (Instance)| Instance affected by failure (0 to signal all).|  |"]
2623    MAV_CMD_INJECT_FAILURE = 420,
2624    #[doc = "Starts receiver pairing."]
2625    #[doc = ""]
2626    #[doc = "# Parameters"]
2627    #[doc = ""]
2628    #[doc = "| Parameter | Description | Values |"]
2629    #[doc = "| --------- | ----------- | ------ |"]
2630    #[doc = "| 1 (RC Type)| RC type.    | [`RcType`] |"]
2631    #[doc = "| 2 (RC Sub Type)| RC sub type.| [`RcSubType`] |"]
2632    MAV_CMD_START_RX_PAIR = 500,
2633    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
2634    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
2635    #[doc = ""]
2636    #[doc = "# Parameters"]
2637    #[doc = ""]
2638    #[doc = "| Parameter | Description | Values |"]
2639    #[doc = "| --------- | ----------- | ------ |"]
2640    #[doc = "| 1 (Message ID)| The MAVLink message ID| 0, 1, .. , 16777215 |"]
2641    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
2642    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
2643    #[doc = ""]
2644    #[doc = "# Parameters"]
2645    #[doc = ""]
2646    #[doc = "| Parameter | Description | Values | Units |"]
2647    #[doc = "| --------- | ----------- | ------ | ----- |"]
2648    #[doc = "| 1 (Message ID)| The MAVLink message ID| 0, 1, .. , 16777215 |  |"]
2649    #[doc = "| 2 (Interval)| The interval between two messages. -1: disable. 0: request default rate (which may be zero).| -1, 0, .. | us |"]
2650    #[doc = "| 3 (Req Param 3)| Use for index ID, if required. Otherwise, the use of this parameter (if any) must be defined in the requested message. By default assumed not used (0).  When used as an index ID, 0 means \"all instances\", \"1\" means the first instance in the sequence (the emitted message will have an id of 0 if message ids are 0-indexed, or 1 if index numbers start from one).|  |  |"]
2651    #[doc = "| 4 (Req Param 4)| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).|  |  |"]
2652    #[doc = "| 5 (Req Param 5)| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0/NaN).|  |  |"]
2653    #[doc = "| 6 (Req Param 6)| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0/NaN).|  |  |"]
2654    #[doc = "| 7 (Response Target)| Target address of message stream (if message has target address fields). 0: Flight-stack default (recommended), 1: address of requestor, 2: broadcast.| 0, 1, 2 |  |"]
2655    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
2656    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
2657    #[doc = ""]
2658    #[doc = "# Parameters"]
2659    #[doc = ""]
2660    #[doc = "| Parameter | Description | Values |"]
2661    #[doc = "| --------- | ----------- | ------ |"]
2662    #[doc = "| 1 (Message ID)| The MAVLink message ID of the requested message.| 0, 1, .. , 16777215 |"]
2663    #[doc = "| 2 (Req Param 1)| Use for index ID, if required. Otherwise, the use of this parameter (if any) must be defined in the requested message. By default assumed not used (0).|  |"]
2664    #[doc = "| 3 (Req Param 2)| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).|  |"]
2665    #[doc = "| 4 (Req Param 3)| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).|  |"]
2666    #[doc = "| 5 (Req Param 4)| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).|  |"]
2667    #[doc = "| 6 (Req Param 5)| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).|  |"]
2668    #[doc = "| 7 (Response Target)| Target address for requested message (if message has target address fields). 0: Flight-stack default, 1: address of requestor, 2: broadcast.| 0, 1, 2 |"]
2669    MAV_CMD_REQUEST_MESSAGE = 512,
2670    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
2671    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
2672    #[doc = ""]
2673    #[doc = "# Parameters"]
2674    #[doc = ""]
2675    #[doc = "| Parameter | Description | Values |"]
2676    #[doc = "| --------- | ----------- | ------ |"]
2677    #[doc = "| 1 (Protocol)| 1: Request supported protocol versions by all nodes on the network| 0, 1 |"]
2678    #[doc = "| 2         | Reserved (all remaining params)|  |"]
2679    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
2680    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
2681    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
2682    #[doc = ""]
2683    #[doc = "# Parameters"]
2684    #[doc = ""]
2685    #[doc = "| Parameter | Description | Values |"]
2686    #[doc = "| --------- | ----------- | ------ |"]
2687    #[doc = "| 1 (Version)| 1: Request autopilot version| 0, 1 |"]
2688    #[doc = "| 2         | Reserved (all remaining params)|  |"]
2689    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
2690    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
2691    #[doc = "Request camera information (CAMERA_INFORMATION)."]
2692    #[doc = ""]
2693    #[doc = "# Parameters"]
2694    #[doc = ""]
2695    #[doc = "| Parameter | Description | Values |"]
2696    #[doc = "| --------- | ----------- | ------ |"]
2697    #[doc = "| 1 (Capabilities)| 0: No action 1: Request camera capabilities| 0, 1 |"]
2698    #[doc = "| 2         | Reserved (all remaining params)|  |"]
2699    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
2700    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
2701    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
2702    #[doc = ""]
2703    #[doc = "# Parameters"]
2704    #[doc = ""]
2705    #[doc = "| Parameter | Description | Values |"]
2706    #[doc = "| --------- | ----------- | ------ |"]
2707    #[doc = "| 1 (Settings)| 0: No Action 1: Request camera settings| 0, 1 |"]
2708    #[doc = "| 2         | Reserved (all remaining params)|  |"]
2709    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
2710    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
2711    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
2712    #[doc = ""]
2713    #[doc = "# Parameters"]
2714    #[doc = ""]
2715    #[doc = "| Parameter | Description | Values |"]
2716    #[doc = "| --------- | ----------- | ------ |"]
2717    #[doc = "| 1 (Storage ID)| Storage ID (0 for all, 1 for first, 2 for second, etc.)| 0, 1, .. |"]
2718    #[doc = "| 2 (Information)| 0: No Action 1: Request storage information| 0, 1 |"]
2719    #[doc = "| 3         | Reserved (all remaining params)|  |"]
2720    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
2721    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
2722    #[doc = ""]
2723    #[doc = "# Parameters"]
2724    #[doc = ""]
2725    #[doc = "| Parameter | Description | Values |"]
2726    #[doc = "| --------- | ----------- | ------ |"]
2727    #[doc = "| 1 (Storage ID)| Storage ID (1 for first, 2 for second, etc.)| 0, 1, .. |"]
2728    #[doc = "| 2 (Format)| Format storage (and reset image log). 0: No action 1: Format storage| 0, 1 |"]
2729    #[doc = "| 3 (Reset Image Log)| Reset Image Log (without formatting storage medium). This will reset CAMERA_CAPTURE_STATUS.image_count and CAMERA_IMAGE_CAPTURED.image_index. 0: No action 1: Reset Image Log| 0, 1 |"]
2730    #[doc = "| 4         | Reserved (all remaining params)|  |"]
2731    MAV_CMD_STORAGE_FORMAT = 526,
2732    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
2733    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
2734    #[doc = ""]
2735    #[doc = "# Parameters"]
2736    #[doc = ""]
2737    #[doc = "| Parameter | Description | Values |"]
2738    #[doc = "| --------- | ----------- | ------ |"]
2739    #[doc = "| 1 (Capture Status)| 0: No Action 1: Request camera capture status| 0, 1 |"]
2740    #[doc = "| 2         | Reserved (all remaining params)|  |"]
2741    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
2742    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
2743    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
2744    #[doc = ""]
2745    #[doc = "# Parameters"]
2746    #[doc = ""]
2747    #[doc = "| Parameter | Description | Values |"]
2748    #[doc = "| --------- | ----------- | ------ |"]
2749    #[doc = "| 1 (Flight Information)| 1: Request flight information| 0, 1 |"]
2750    #[doc = "| 2         | Reserved (all remaining params)|  |"]
2751    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
2752    #[doc = "Reset all camera settings to Factory Default"]
2753    #[doc = ""]
2754    #[doc = "# Parameters"]
2755    #[doc = ""]
2756    #[doc = "| Parameter | Description | Values |"]
2757    #[doc = "| --------- | ----------- | ------ |"]
2758    #[doc = "| 1 (Reset) | 0: No Action 1: Reset all settings| 0, 1 |"]
2759    #[doc = "| 2 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |"]
2760    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
2761    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
2762    #[doc = ""]
2763    #[doc = "# Parameters"]
2764    #[doc = ""]
2765    #[doc = "| Parameter | Description | Values |"]
2766    #[doc = "| --------- | ----------- | ------ |"]
2767    #[doc = "| 1 (id)    | Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |"]
2768    #[doc = "| 2 (Camera Mode)| Camera mode | [`CameraMode`] |"]
2769    #[doc = "| 3         |             | Reserved (use NaN) |"]
2770    #[doc = "| 4         |             | Reserved (use NaN) |"]
2771    #[doc = "| 5         |             |  |"]
2772    #[doc = "| 6         |             |  |"]
2773    #[doc = "| 7         |             | Reserved (use NaN) |"]
2774    MAV_CMD_SET_CAMERA_MODE = 530,
2775    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
2776    #[doc = ""]
2777    #[doc = "# Parameters"]
2778    #[doc = ""]
2779    #[doc = "| Parameter | Description | Values |"]
2780    #[doc = "| --------- | ----------- | ------ |"]
2781    #[doc = "| 1 (Zoom Type)| Zoom type   | [`CameraZoomType`] |"]
2782    #[doc = "| 2 (Zoom Value)| Zoom value. The range of valid values depend on the zoom type.|  |"]
2783    #[doc = "| 3 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |"]
2784    #[doc = "| 4         |             | Reserved (use NaN) |"]
2785    MAV_CMD_SET_CAMERA_ZOOM = 531,
2786    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
2787    #[doc = ""]
2788    #[doc = "# Parameters"]
2789    #[doc = ""]
2790    #[doc = "| Parameter | Description | Values |"]
2791    #[doc = "| --------- | ----------- | ------ |"]
2792    #[doc = "| 1 (Focus Type)| Focus type  | [`SetFocusType`] |"]
2793    #[doc = "| 2 (Focus Value)| Focus value |  |"]
2794    #[doc = "| 3 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |"]
2795    #[doc = "| 4         |             | Reserved (use NaN) |"]
2796    MAV_CMD_SET_CAMERA_FOCUS = 532,
2797    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
2798    #[doc = ""]
2799    #[doc = "# Parameters"]
2800    #[doc = ""]
2801    #[doc = "| Parameter | Description | Values |"]
2802    #[doc = "| --------- | ----------- | ------ |"]
2803    #[doc = "| 1 (Storage ID)| Storage ID (1 for first, 2 for second, etc.)| 0, 1, .. |"]
2804    #[doc = "| 2 (Usage) | Usage flags | [`StorageUsageFlag`] |"]
2805    MAV_CMD_SET_STORAGE_USAGE = 533,
2806    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
2807    #[doc = ""]
2808    #[doc = "# Parameters"]
2809    #[doc = ""]
2810    #[doc = "| Parameter | Description | Values |"]
2811    #[doc = "| --------- | ----------- | ------ |"]
2812    #[doc = "| 1 (device id)| Component Id of camera to address or 1-6 for non-MAVLink cameras, 0 for all cameras.|  |"]
2813    #[doc = "| 2 (primary source)| Primary Source| [`CameraSource`] |"]
2814    #[doc = "| 3 (secondary source)| Secondary Source. If non-zero the second source will be displayed as picture-in-picture.| [`CameraSource`] |"]
2815    MAV_CMD_SET_CAMERA_SOURCE = 534,
2816    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
2817    #[doc = ""]
2818    #[doc = "# Parameters"]
2819    #[doc = ""]
2820    #[doc = "| Parameter | Description | Values |"]
2821    #[doc = "| --------- | ----------- | ------ |"]
2822    #[doc = "| 1 (Tag)   | Tag.        | 0, 1, .. |"]
2823    MAV_CMD_JUMP_TAG = 600,
2824    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
2825    #[doc = ""]
2826    #[doc = "# Parameters"]
2827    #[doc = ""]
2828    #[doc = "| Parameter | Description | Values |"]
2829    #[doc = "| --------- | ----------- | ------ |"]
2830    #[doc = "| 1 (Tag)   | Target tag to jump to.| 0, 1, .. |"]
2831    #[doc = "| 2 (Repeat)| Repeat count.| 0, 1, .. |"]
2832    MAV_CMD_DO_JUMP_TAG = 601,
2833    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
2834    #[doc = ""]
2835    #[doc = "# Parameters"]
2836    #[doc = ""]
2837    #[doc = "| Parameter | Description | Values | Units |"]
2838    #[doc = "| --------- | ----------- | ------ | ----- |"]
2839    #[doc = "| 1 (Pitch angle)| Pitch angle (positive to pitch up, relative to vehicle for FOLLOW mode, relative to world horizon for LOCK mode).| -180 .. 180 | deg |"]
2840    #[doc = "| 2 (Yaw angle)| Yaw angle (positive to yaw to the right, relative to vehicle for FOLLOW mode, absolute to North for LOCK mode).| -180 .. 180 | deg |"]
2841    #[doc = "| 3 (Pitch rate)| Pitch rate (positive to pitch up).|  | deg/s |"]
2842    #[doc = "| 4 (Yaw rate)| Yaw rate (positive to yaw to the right).|  | deg/s |"]
2843    #[doc = "| 5 (Gimbal manager flags)| Gimbal manager flags to use.| [`GimbalManagerFlags`] |  |"]
2844    #[doc = "| 6         |             |  |  |"]
2845    #[doc = "| 7 (Gimbal device ID)| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).|  |  |"]
2846    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
2847    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
2848    #[doc = ""]
2849    #[doc = "# Parameters"]
2850    #[doc = ""]
2851    #[doc = "| Parameter | Description |"]
2852    #[doc = "| --------- | ----------- |"]
2853    #[doc = "| 1 (sysid primary control)| Sysid for primary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).|"]
2854    #[doc = "| 2 (compid primary control)| Compid for primary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).|"]
2855    #[doc = "| 3 (sysid secondary control)| Sysid for secondary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).|"]
2856    #[doc = "| 4 (compid secondary control)| Compid for secondary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).|"]
2857    #[doc = "| 5         |             |"]
2858    #[doc = "| 6         |             |"]
2859    #[doc = "| 7 (Gimbal device ID)| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).|"]
2860    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
2861    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
2862    #[doc = ""]
2863    #[doc = "# Parameters"]
2864    #[doc = ""]
2865    #[doc = "| Parameter | Description | Values | Units |"]
2866    #[doc = "| --------- | ----------- | ------ | ----- |"]
2867    #[doc = "| 1 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |  |"]
2868    #[doc = "| 2 (Interval)| Desired elapsed time between two consecutive pictures (in seconds). Minimum values depend on hardware (typically greater than 2 seconds).| &ge; 0 | s |"]
2869    #[doc = "| 3 (Total Images)| Total number of images to capture. 0 to capture forever/until MAV_CMD_IMAGE_STOP_CAPTURE.| 0, 1, .. |  |"]
2870    #[doc = "| 4 (Sequence Number)| Capture sequence number starting from 1. This is only valid for single-capture (param3 == 1), otherwise set to 0. Increment the capture ID for each capture command to prevent double captures when a command is re-transmitted.| 1, 2, .. |  |"]
2871    #[doc = "| 5         |             |  |  |"]
2872    #[doc = "| 6         |             |  |  |"]
2873    #[doc = "| 7         |             | Reserved (use NaN) |  |"]
2874    MAV_CMD_IMAGE_START_CAPTURE = 2000,
2875    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
2876    #[doc = ""]
2877    #[doc = "# Parameters"]
2878    #[doc = ""]
2879    #[doc = "| Parameter | Description | Values |"]
2880    #[doc = "| --------- | ----------- | ------ |"]
2881    #[doc = "| 1 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |"]
2882    #[doc = "| 2         |             | Reserved (use NaN) |"]
2883    #[doc = "| 3         |             | Reserved (use NaN) |"]
2884    #[doc = "| 4         |             | Reserved (use NaN) |"]
2885    #[doc = "| 5         |             |  |"]
2886    #[doc = "| 6         |             |  |"]
2887    #[doc = "| 7         |             | Reserved (use NaN) |"]
2888    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
2889    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
2890    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
2891    #[doc = ""]
2892    #[doc = "# Parameters"]
2893    #[doc = ""]
2894    #[doc = "| Parameter | Description | Values |"]
2895    #[doc = "| --------- | ----------- | ------ |"]
2896    #[doc = "| 1 (Number)| Sequence number for missing CAMERA_IMAGE_CAPTURED message| 0, 1, .. |"]
2897    #[doc = "| 2         |             | Reserved (use NaN) |"]
2898    #[doc = "| 3         |             | Reserved (use NaN) |"]
2899    #[doc = "| 4         |             | Reserved (use NaN) |"]
2900    #[doc = "| 5         |             |  |"]
2901    #[doc = "| 6         |             |  |"]
2902    #[doc = "| 7         |             | Reserved (use NaN) |"]
2903    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
2904    #[doc = "Enable or disable on-board camera triggering system."]
2905    #[doc = ""]
2906    #[doc = "# Parameters"]
2907    #[doc = ""]
2908    #[doc = "| Parameter | Description | Values |"]
2909    #[doc = "| --------- | ----------- | ------ |"]
2910    #[doc = "| 1 (Enable)| Trigger enable/disable (0 for disable, 1 for start), -1 to ignore| -1, 0, 1 |"]
2911    #[doc = "| 2 (Reset) | 1 to reset the trigger sequence, -1 or 0 to ignore| -1, 0, 1 |"]
2912    #[doc = "| 3 (Pause) | 1 to pause triggering, but without switching the camera off or retracting it. -1 to ignore| -1, 1 |"]
2913    #[doc = "| 4 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |"]
2914    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
2915    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
2916    #[doc = ""]
2917    #[doc = "# Parameters"]
2918    #[doc = ""]
2919    #[doc = "| Parameter | Description | Values |"]
2920    #[doc = "| --------- | ----------- | ------ |"]
2921    #[doc = "| 1 (Point x)| Point to track x value (normalized 0..1, 0 is left, 1 is right).| 0 .. 1 |"]
2922    #[doc = "| 2 (Point y)| Point to track y value (normalized 0..1, 0 is top, 1 is bottom).| 0 .. 1 |"]
2923    #[doc = "| 3 (Radius)| Point radius (normalized 0..1, 0 is one pixel, 1 is full image width).| 0 .. 1 |"]
2924    #[doc = "| 4 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |"]
2925    MAV_CMD_CAMERA_TRACK_POINT = 2004,
2926    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
2927    #[doc = ""]
2928    #[doc = "# Parameters"]
2929    #[doc = ""]
2930    #[doc = "| Parameter | Description | Values |"]
2931    #[doc = "| --------- | ----------- | ------ |"]
2932    #[doc = "| 1 (Top left corner x)| Top left corner of rectangle x value (normalized 0..1, 0 is left, 1 is right).| 0 .. 1 |"]
2933    #[doc = "| 2 (Top left corner y)| Top left corner of rectangle y value (normalized 0..1, 0 is top, 1 is bottom).| 0 .. 1 |"]
2934    #[doc = "| 3 (Bottom right corner x)| Bottom right corner of rectangle x value (normalized 0..1, 0 is left, 1 is right).| 0 .. 1 |"]
2935    #[doc = "| 4 (Bottom right corner y)| Bottom right corner of rectangle y value (normalized 0..1, 0 is top, 1 is bottom).| 0 .. 1 |"]
2936    #[doc = "| 5 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |"]
2937    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
2938    #[doc = "Stops ongoing tracking."]
2939    #[doc = ""]
2940    #[doc = "# Parameters"]
2941    #[doc = ""]
2942    #[doc = "| Parameter | Description | Values |"]
2943    #[doc = "| --------- | ----------- | ------ |"]
2944    #[doc = "| 1 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |"]
2945    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
2946    #[doc = "Starts video capture (recording)."]
2947    #[doc = ""]
2948    #[doc = "# Parameters"]
2949    #[doc = ""]
2950    #[doc = "| Parameter | Description | Values | Units |"]
2951    #[doc = "| --------- | ----------- | ------ | ----- |"]
2952    #[doc = "| 1 (Stream ID)| Video Stream ID (0 for all streams)| 0, 1, .. |  |"]
2953    #[doc = "| 2 (Status Frequency)| Frequency CAMERA_CAPTURE_STATUS messages should be sent while recording (0 for no messages, otherwise frequency)| &ge; 0 | Hz |"]
2954    #[doc = "| 3 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |  |"]
2955    #[doc = "| 4         |             | Reserved (use NaN) |  |"]
2956    #[doc = "| 5         |             |  |  |"]
2957    #[doc = "| 6         |             |  |  |"]
2958    #[doc = "| 7         |             | Reserved (use NaN) |  |"]
2959    MAV_CMD_VIDEO_START_CAPTURE = 2500,
2960    #[doc = "Stop the current video capture (recording)."]
2961    #[doc = ""]
2962    #[doc = "# Parameters"]
2963    #[doc = ""]
2964    #[doc = "| Parameter | Description | Values |"]
2965    #[doc = "| --------- | ----------- | ------ |"]
2966    #[doc = "| 1 (Stream ID)| Video Stream ID (0 for all streams)| 0, 1, .. |"]
2967    #[doc = "| 2 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |"]
2968    #[doc = "| 3         |             | Reserved (use NaN) |"]
2969    #[doc = "| 4         |             | Reserved (use NaN) |"]
2970    #[doc = "| 5         |             |  |"]
2971    #[doc = "| 6         |             |  |"]
2972    #[doc = "| 7         |             | Reserved (use NaN) |"]
2973    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
2974    #[doc = "Start video streaming"]
2975    #[doc = ""]
2976    #[doc = "# Parameters"]
2977    #[doc = ""]
2978    #[doc = "| Parameter | Description | Values |"]
2979    #[doc = "| --------- | ----------- | ------ |"]
2980    #[doc = "| 1 (Stream ID)| Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| 0, 1, .. |"]
2981    #[doc = "| 2 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |"]
2982    MAV_CMD_VIDEO_START_STREAMING = 2502,
2983    #[doc = "Stop the given video stream"]
2984    #[doc = ""]
2985    #[doc = "# Parameters"]
2986    #[doc = ""]
2987    #[doc = "| Parameter | Description | Values |"]
2988    #[doc = "| --------- | ----------- | ------ |"]
2989    #[doc = "| 1 (Stream ID)| Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| 0, 1, .. |"]
2990    #[doc = "| 2 (Target Camera ID)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| 0, 1, .. , 255 |"]
2991    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
2992    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
2993    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
2994    #[doc = ""]
2995    #[doc = "# Parameters"]
2996    #[doc = ""]
2997    #[doc = "| Parameter | Description | Values |"]
2998    #[doc = "| --------- | ----------- | ------ |"]
2999    #[doc = "| 1 (Stream ID)| Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| 0, 1, .. |"]
3000    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
3001    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
3002    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
3003    #[doc = ""]
3004    #[doc = "# Parameters"]
3005    #[doc = ""]
3006    #[doc = "| Parameter | Description | Values |"]
3007    #[doc = "| --------- | ----------- | ------ |"]
3008    #[doc = "| 1 (Stream ID)| Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| 0, 1, .. |"]
3009    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
3010    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
3011    #[doc = ""]
3012    #[doc = "# Parameters"]
3013    #[doc = ""]
3014    #[doc = "| Parameter | Description | Values |"]
3015    #[doc = "| --------- | ----------- | ------ |"]
3016    #[doc = "| 1 (Format)| Format: 0: ULog| 0, 1, .. |"]
3017    #[doc = "| 2         | Reserved (set to 0)|  |"]
3018    #[doc = "| 3         | Reserved (set to 0)|  |"]
3019    #[doc = "| 4         | Reserved (set to 0)|  |"]
3020    #[doc = "| 5         | Reserved (set to 0)|  |"]
3021    #[doc = "| 6         | Reserved (set to 0)|  |"]
3022    #[doc = "| 7         | Reserved (set to 0)|  |"]
3023    MAV_CMD_LOGGING_START = 2510,
3024    #[doc = "Request to stop streaming log data over MAVLink"]
3025    #[doc = ""]
3026    #[doc = "# Parameters"]
3027    #[doc = ""]
3028    #[doc = "| Parameter | Description |"]
3029    #[doc = "| --------- | ----------- |"]
3030    #[doc = "| 1         | Reserved (set to 0)|"]
3031    #[doc = "| 2         | Reserved (set to 0)|"]
3032    #[doc = "| 3         | Reserved (set to 0)|"]
3033    #[doc = "| 4         | Reserved (set to 0)|"]
3034    #[doc = "| 5         | Reserved (set to 0)|"]
3035    #[doc = "| 6         | Reserved (set to 0)|"]
3036    #[doc = "| 7         | Reserved (set to 0)|"]
3037    MAV_CMD_LOGGING_STOP = 2511,
3038    #[doc = ""]
3039    #[doc = "# Parameters"]
3040    #[doc = ""]
3041    #[doc = "| Parameter | Description | Values |"]
3042    #[doc = "| --------- | ----------- | ------ |"]
3043    #[doc = "| 1 (Landing Gear ID)| Landing gear ID (default: 0, -1 for all)| -1, 0, .. |"]
3044    #[doc = "| 2 (Landing Gear Position)| Landing gear position (Down: 0, Up: 1, NaN for no change)|  |"]
3045    #[doc = "| 3         |             | Reserved (use NaN) |"]
3046    #[doc = "| 4         |             | Reserved (use NaN) |"]
3047    #[doc = "| 5         |             |  |"]
3048    #[doc = "| 6         |             |  |"]
3049    #[doc = "| 7         |             | Reserved (use NaN) |"]
3050    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
3051    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
3052    #[doc = ""]
3053    #[doc = "# Parameters"]
3054    #[doc = ""]
3055    #[doc = "| Parameter | Description | Values |"]
3056    #[doc = "| --------- | ----------- | ------ |"]
3057    #[doc = "| 1 (Enable)| Control transmission over high latency telemetry (0: stop, 1: start)| 0, 1 |"]
3058    #[doc = "| 2         | Empty       |  |"]
3059    #[doc = "| 3         | Empty       |  |"]
3060    #[doc = "| 4         | Empty       |  |"]
3061    #[doc = "| 5         | Empty       |  |"]
3062    #[doc = "| 6         | Empty       |  |"]
3063    #[doc = "| 7         | Empty       |  |"]
3064    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
3065    #[doc = "Create a panorama at the current position"]
3066    #[doc = ""]
3067    #[doc = "# Parameters"]
3068    #[doc = ""]
3069    #[doc = "| Parameter | Description | Units |"]
3070    #[doc = "| --------- | ----------- | ----- |"]
3071    #[doc = "| 1 (Horizontal Angle)| Viewing angle horizontal of the panorama (+- 0.5 the total angle)| deg |"]
3072    #[doc = "| 2 (Vertical Angle)| Viewing angle vertical of panorama.| deg |"]
3073    #[doc = "| 3 (Horizontal Speed)| Speed of the horizontal rotation.| deg/s |"]
3074    #[doc = "| 4 (Vertical Speed)| Speed of the vertical rotation.| deg/s |"]
3075    MAV_CMD_PANORAMA_CREATE = 2800,
3076    #[doc = "Request VTOL transition"]
3077    #[doc = ""]
3078    #[doc = "# Parameters"]
3079    #[doc = ""]
3080    #[doc = "| Parameter | Description | Values |"]
3081    #[doc = "| --------- | ----------- | ------ |"]
3082    #[doc = "| 1 (State) | The target VTOL state. For normal transitions, only MAV_VTOL_STATE_MC and MAV_VTOL_STATE_FW can be used.| [`MavVtolState`] |"]
3083    #[doc = "| 2 (Immediate)| Force immediate transition to the specified MAV_VTOL_STATE. 1: Force immediate, 0: normal transition. Can be used, for example, to trigger an emergency \"Quadchute\". Caution: Can be dangerous/damage vehicle, depending on autopilot implementation of this command.|  |"]
3084    MAV_CMD_DO_VTOL_TRANSITION = 3000,
3085    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
3086    #[doc = ""]
3087    #[doc = "# Parameters"]
3088    #[doc = ""]
3089    #[doc = "| Parameter | Description | Values |"]
3090    #[doc = "| --------- | ----------- | ------ |"]
3091    #[doc = "| 1 (System ID)| Vehicle system id, this way ground station can request arm authorization on behalf of any vehicle| 0, 1, .. , 255 |"]
3092    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
3093    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
3094    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
3095    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
3096    #[doc = ""]
3097    #[doc = "# Parameters"]
3098    #[doc = ""]
3099    #[doc = "| Parameter | Description | Units |"]
3100    #[doc = "| --------- | ----------- | ----- |"]
3101    #[doc = "| 1 (Radius)| Radius of desired circle in CIRCLE_MODE| m |"]
3102    #[doc = "| 2         | User defined|  |"]
3103    #[doc = "| 3         | User defined|  |"]
3104    #[doc = "| 4         | User defined|  |"]
3105    #[doc = "| 5 (Latitude)| Target latitude of center of circle in CIRCLE_MODE| degE7 |"]
3106    #[doc = "| 6 (Longitude)| Target longitude of center of circle in CIRCLE_MODE| degE7 |"]
3107    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
3108    #[doc = "Delay mission state machine until gate has been reached."]
3109    #[doc = ""]
3110    #[doc = "# Parameters"]
3111    #[doc = ""]
3112    #[doc = "| Parameter | Description | Values | Units |"]
3113    #[doc = "| --------- | ----------- | ------ | ----- |"]
3114    #[doc = "| 1 (Geometry)| Geometry: 0: orthogonal to path between previous and next waypoint.| 0, 1, .. |  |"]
3115    #[doc = "| 2 (UseAltitude)| Altitude: 0: ignore altitude| 0, 1 |  |"]
3116    #[doc = "| 3         | Empty       |  |  |"]
3117    #[doc = "| 4         | Empty       |  |  |"]
3118    #[doc = "| 5 (Latitude)| Latitude    |  |  |"]
3119    #[doc = "| 6 (Longitude)| Longitude   |  |  |"]
3120    #[doc = "| 7 (Altitude)| Altitude    |  | m |"]
3121    MAV_CMD_CONDITION_GATE = 4501,
3122    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
3123    #[doc = ""]
3124    #[doc = "# Parameters"]
3125    #[doc = ""]
3126    #[doc = "| Parameter | Description | Units |"]
3127    #[doc = "| --------- | ----------- | ----- |"]
3128    #[doc = "| 1         | Reserved    |  |"]
3129    #[doc = "| 2         | Reserved    |  |"]
3130    #[doc = "| 3         | Reserved    |  |"]
3131    #[doc = "| 4         | Reserved    |  |"]
3132    #[doc = "| 5 (Latitude)| Latitude    |  |"]
3133    #[doc = "| 6 (Longitude)| Longitude   |  |"]
3134    #[doc = "| 7 (Altitude)| Altitude    | m |"]
3135    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
3136    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
3137    #[doc = ""]
3138    #[doc = "# Parameters"]
3139    #[doc = ""]
3140    #[doc = "| Parameter | Description | Values |"]
3141    #[doc = "| --------- | ----------- | ------ |"]
3142    #[doc = "| 1 (Vertex Count)| Polygon vertex count. This is the number of vertices in the current polygon (all vertices will have the same number).| 3, 4, .. |"]
3143    #[doc = "| 2 (Inclusion Group)| Vehicle must be inside ALL inclusion zones in a single group, vehicle must be inside at least one group, must be the same for all points in each polygon| 0, 1, .. |"]
3144    #[doc = "| 3         | Reserved    |  |"]
3145    #[doc = "| 4         | Reserved    |  |"]
3146    #[doc = "| 5 (Latitude)| Latitude    |  |"]
3147    #[doc = "| 6 (Longitude)| Longitude   |  |"]
3148    #[doc = "| 7         | Reserved    |  |"]
3149    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
3150    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
3151    #[doc = ""]
3152    #[doc = "# Parameters"]
3153    #[doc = ""]
3154    #[doc = "| Parameter | Description | Values |"]
3155    #[doc = "| --------- | ----------- | ------ |"]
3156    #[doc = "| 1 (Vertex Count)| Polygon vertex count. This is the number of vertices in the current polygon (all vertices will have the same number).| 3, 4, .. |"]
3157    #[doc = "| 2         | Reserved    |  |"]
3158    #[doc = "| 3         | Reserved    |  |"]
3159    #[doc = "| 4         | Reserved    |  |"]
3160    #[doc = "| 5 (Latitude)| Latitude    |  |"]
3161    #[doc = "| 6 (Longitude)| Longitude   |  |"]
3162    #[doc = "| 7         | Reserved    |  |"]
3163    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
3164    #[doc = "Circular fence area. The vehicle must stay inside this area."]
3165    #[doc = ""]
3166    #[doc = "# Parameters"]
3167    #[doc = ""]
3168    #[doc = "| Parameter | Description | Values | Units |"]
3169    #[doc = "| --------- | ----------- | ------ | ----- |"]
3170    #[doc = "| 1 (Radius)| Radius.     |  | m |"]
3171    #[doc = "| 2 (Inclusion Group)| Vehicle must be inside ALL inclusion zones in a single group, vehicle must be inside at least one group| 0, 1, .. |  |"]
3172    #[doc = "| 3         | Reserved    |  |  |"]
3173    #[doc = "| 4         | Reserved    |  |  |"]
3174    #[doc = "| 5 (Latitude)| Latitude    |  |  |"]
3175    #[doc = "| 6 (Longitude)| Longitude   |  |  |"]
3176    #[doc = "| 7         | Reserved    |  |  |"]
3177    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
3178    #[doc = "Circular fence area. The vehicle must stay outside this area."]
3179    #[doc = ""]
3180    #[doc = "# Parameters"]
3181    #[doc = ""]
3182    #[doc = "| Parameter | Description | Units |"]
3183    #[doc = "| --------- | ----------- | ----- |"]
3184    #[doc = "| 1 (Radius)| Radius.     | m |"]
3185    #[doc = "| 2         | Reserved    |  |"]
3186    #[doc = "| 3         | Reserved    |  |"]
3187    #[doc = "| 4         | Reserved    |  |"]
3188    #[doc = "| 5 (Latitude)| Latitude    |  |"]
3189    #[doc = "| 6 (Longitude)| Longitude   |  |"]
3190    #[doc = "| 7         | Reserved    |  |"]
3191    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
3192    #[doc = "Rally point. You can have multiple rally points defined."]
3193    #[doc = ""]
3194    #[doc = "# Parameters"]
3195    #[doc = ""]
3196    #[doc = "| Parameter | Description | Units |"]
3197    #[doc = "| --------- | ----------- | ----- |"]
3198    #[doc = "| 1         | Reserved    |  |"]
3199    #[doc = "| 2         | Reserved    |  |"]
3200    #[doc = "| 3         | Reserved    |  |"]
3201    #[doc = "| 4         | Reserved    |  |"]
3202    #[doc = "| 5 (Latitude)| Latitude    |  |"]
3203    #[doc = "| 6 (Longitude)| Longitude   |  |"]
3204    #[doc = "| 7 (Altitude)| Altitude    | m |"]
3205    MAV_CMD_NAV_RALLY_POINT = 5100,
3206    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
3207    #[doc = ""]
3208    #[doc = "# Parameters"]
3209    #[doc = ""]
3210    #[doc = "| Parameter | Description |"]
3211    #[doc = "| --------- | ----------- |"]
3212    #[doc = "| 1         | Reserved (set to 0)|"]
3213    #[doc = "| 2         | Reserved (set to 0)|"]
3214    #[doc = "| 3         | Reserved (set to 0)|"]
3215    #[doc = "| 4         | Reserved (set to 0)|"]
3216    #[doc = "| 5         | Reserved (set to 0)|"]
3217    #[doc = "| 6         | Reserved (set to 0)|"]
3218    #[doc = "| 7         | Reserved (set to 0)|"]
3219    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
3220    #[doc = "Change state of safety switch."]
3221    #[doc = ""]
3222    #[doc = "# Parameters"]
3223    #[doc = ""]
3224    #[doc = "| Parameter | Description | Values |"]
3225    #[doc = "| --------- | ----------- | ------ |"]
3226    #[doc = "| 1 (Desired State)| New safety switch state.| [`SafetySwitchState`] |"]
3227    #[doc = "| 2         | Empty.      |  |"]
3228    #[doc = "| 3         | Empty.      |  |"]
3229    #[doc = "| 4         | Empty       |  |"]
3230    #[doc = "| 5         | Empty.      |  |"]
3231    #[doc = "| 6         | Empty.      |  |"]
3232    #[doc = "| 7         | Empty.      |  |"]
3233    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
3234    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
3235    #[doc = ""]
3236    #[doc = "# Parameters"]
3237    #[doc = ""]
3238    #[doc = "| Parameter | Description |"]
3239    #[doc = "| --------- | ----------- |"]
3240    #[doc = "| 1         | Reserved (set to 0)|"]
3241    #[doc = "| 2         | Reserved (set to 0)|"]
3242    #[doc = "| 3         | Reserved (set to 0)|"]
3243    #[doc = "| 4         | Reserved (set to 0)|"]
3244    #[doc = "| 5         | Reserved (set to 0)|"]
3245    #[doc = "| 6         | Reserved (set to 0)|"]
3246    #[doc = "| 7         | Reserved (set to 0)|"]
3247    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
3248    #[deprecated = "  (Deprecated since 2021-06)"]
3249    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
3250    #[doc = ""]
3251    #[doc = "# Parameters"]
3252    #[doc = ""]
3253    #[doc = "| Parameter | Description | Values | Units |"]
3254    #[doc = "| --------- | ----------- | ------ | ----- |"]
3255    #[doc = "| 1 (Operation Mode)| Operation mode. 0: prepare single payload deploy (overwriting previous requests), but do not execute it. 1: execute payload deploy immediately (rejecting further deploy commands during execution, but allowing abort). 2: add payload deploy to existing deployment list.| 0, 1, 2 |  |"]
3256    #[doc = "| 2 (Approach Vector)| Desired approach vector in compass heading. A negative value indicates the system can define the approach vector at will.| -1 .. 360 | deg |"]
3257    #[doc = "| 3 (Ground Speed)| Desired ground speed at release time. This can be overridden by the airframe in case it needs to meet minimum airspeed. A negative value indicates the system can define the ground speed at will.| &ge; -1 |  |"]
3258    #[doc = "| 4 (Altitude Clearance)| Minimum altitude clearance to the release position. A negative value indicates the system can define the clearance at will.| &ge; -1 | m |"]
3259    #[doc = "| 5 (Latitude)| Latitude.   |  | degE7 |"]
3260    #[doc = "| 6 (Longitude)| Longitude.  |  | degE7 |"]
3261    #[doc = "| 7 (Altitude)| Altitude (MSL)|  | m |"]
3262    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
3263    #[deprecated = "  (Deprecated since 2021-06)"]
3264    #[doc = "Control the payload deployment."]
3265    #[doc = ""]
3266    #[doc = "# Parameters"]
3267    #[doc = ""]
3268    #[doc = "| Parameter | Description | Values |"]
3269    #[doc = "| --------- | ----------- | ------ |"]
3270    #[doc = "| 1 (Operation Mode)| Operation mode. 0: Abort deployment, continue normal mission. 1: switch to payload deployment mode. 100: delete first payload deployment request. 101: delete all payload deployment requests.| 0, 1, .. , 101 |"]
3271    #[doc = "| 2         | Reserved    |  |"]
3272    #[doc = "| 3         | Reserved    |  |"]
3273    #[doc = "| 4         | Reserved    |  |"]
3274    #[doc = "| 5         | Reserved    |  |"]
3275    #[doc = "| 6         | Reserved    |  |"]
3276    #[doc = "| 7         | Reserved    |  |"]
3277    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
3278    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
3279    #[doc = ""]
3280    #[doc = "# Parameters"]
3281    #[doc = ""]
3282    #[doc = "| Parameter | Description | Units |"]
3283    #[doc = "| --------- | ----------- | ----- |"]
3284    #[doc = "| 1 (Yaw)   | Yaw of vehicle in earth frame.| deg |"]
3285    #[doc = "| 2 (CompassMask)| CompassMask, 0 for all.|  |"]
3286    #[doc = "| 3 (Latitude)| Latitude.   | deg |"]
3287    #[doc = "| 4 (Longitude)| Longitude.  | deg |"]
3288    #[doc = "| 5         | Empty.      |  |"]
3289    #[doc = "| 6         | Empty.      |  |"]
3290    #[doc = "| 7         | Empty.      |  |"]
3291    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
3292    #[doc = "Command to operate winch."]
3293    #[doc = ""]
3294    #[doc = "# Parameters"]
3295    #[doc = ""]
3296    #[doc = "| Parameter | Description | Values | Units |"]
3297    #[doc = "| --------- | ----------- | ------ | ----- |"]
3298    #[doc = "| 1 (Instance)| Winch instance number.| 1, 2, .. |  |"]
3299    #[doc = "| 2 (Action)| Action to perform.| [`WinchActions`] |  |"]
3300    #[doc = "| 3 (Length)| Length of line to release (negative to wind).|  | m |"]
3301    #[doc = "| 4 (Rate)  | Release rate (negative to wind).|  | m/s |"]
3302    #[doc = "| 5         | Empty.      |  |  |"]
3303    #[doc = "| 6         | Empty.      |  |  |"]
3304    #[doc = "| 7         | Empty.      |  |  |"]
3305    MAV_CMD_DO_WINCH = 42600,
3306    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
3307    #[doc = ""]
3308    #[doc = "# Parameters"]
3309    #[doc = ""]
3310    #[doc = "| Parameter | Description | Units |"]
3311    #[doc = "| --------- | ----------- | ----- |"]
3312    #[doc = "| 1 (transmission_time)| Timestamp that this message was sent as a time in the transmitters time domain. The sender should wrap this time back to zero based on required timing accuracy for the application and the limitations of a 32 bit float. For example, wrapping at 10 hours would give approximately 1ms accuracy. Recipient must handle time wrap in any timing jitter correction applied to this field. Wrap rollover time should not be at not more than 250 seconds, which would give approximately 10 microsecond accuracy.| s |"]
3313    #[doc = "| 2 (processing_time)| The time spent in processing the sensor data that is the basis for this position. The recipient can use this to improve time alignment of the data. Set to zero if not known.| s |"]
3314    #[doc = "| 3 (accuracy)| estimated one standard deviation accuracy of the measurement. Set to NaN if not known.|  |"]
3315    #[doc = "| 4         | Empty       |  |"]
3316    #[doc = "| 5 (Latitude)| Latitude    |  |"]
3317    #[doc = "| 6 (Longitude)| Longitude   |  |"]
3318    #[doc = "| 7 (Altitude)| Altitude, not used. Should be sent as NaN. May be supported in a future version of this message.| m |"]
3319    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
3320    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
3321    #[doc = ""]
3322    #[doc = "# Parameters"]
3323    #[doc = ""]
3324    #[doc = "| Parameter | Description | Units |"]
3325    #[doc = "| --------- | ----------- | ----- |"]
3326    #[doc = "| 1         | User defined|  |"]
3327    #[doc = "| 2         | User defined|  |"]
3328    #[doc = "| 3         | User defined|  |"]
3329    #[doc = "| 4         | User defined|  |"]
3330    #[doc = "| 5 (Latitude)| Latitude unscaled|  |"]
3331    #[doc = "| 6 (Longitude)| Longitude unscaled|  |"]
3332    #[doc = "| 7 (Altitude)| Altitude (MSL)| m |"]
3333    MAV_CMD_WAYPOINT_USER_1 = 31000,
3334    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
3335    #[doc = ""]
3336    #[doc = "# Parameters"]
3337    #[doc = ""]
3338    #[doc = "| Parameter | Description | Units |"]
3339    #[doc = "| --------- | ----------- | ----- |"]
3340    #[doc = "| 1         | User defined|  |"]
3341    #[doc = "| 2         | User defined|  |"]
3342    #[doc = "| 3         | User defined|  |"]
3343    #[doc = "| 4         | User defined|  |"]
3344    #[doc = "| 5 (Latitude)| Latitude unscaled|  |"]
3345    #[doc = "| 6 (Longitude)| Longitude unscaled|  |"]
3346    #[doc = "| 7 (Altitude)| Altitude (MSL)| m |"]
3347    MAV_CMD_WAYPOINT_USER_2 = 31001,
3348    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
3349    #[doc = ""]
3350    #[doc = "# Parameters"]
3351    #[doc = ""]
3352    #[doc = "| Parameter | Description | Units |"]
3353    #[doc = "| --------- | ----------- | ----- |"]
3354    #[doc = "| 1         | User defined|  |"]
3355    #[doc = "| 2         | User defined|  |"]
3356    #[doc = "| 3         | User defined|  |"]
3357    #[doc = "| 4         | User defined|  |"]
3358    #[doc = "| 5 (Latitude)| Latitude unscaled|  |"]
3359    #[doc = "| 6 (Longitude)| Longitude unscaled|  |"]
3360    #[doc = "| 7 (Altitude)| Altitude (MSL)| m |"]
3361    MAV_CMD_WAYPOINT_USER_3 = 31002,
3362    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
3363    #[doc = ""]
3364    #[doc = "# Parameters"]
3365    #[doc = ""]
3366    #[doc = "| Parameter | Description | Units |"]
3367    #[doc = "| --------- | ----------- | ----- |"]
3368    #[doc = "| 1         | User defined|  |"]
3369    #[doc = "| 2         | User defined|  |"]
3370    #[doc = "| 3         | User defined|  |"]
3371    #[doc = "| 4         | User defined|  |"]
3372    #[doc = "| 5 (Latitude)| Latitude unscaled|  |"]
3373    #[doc = "| 6 (Longitude)| Longitude unscaled|  |"]
3374    #[doc = "| 7 (Altitude)| Altitude (MSL)| m |"]
3375    MAV_CMD_WAYPOINT_USER_4 = 31003,
3376    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
3377    #[doc = ""]
3378    #[doc = "# Parameters"]
3379    #[doc = ""]
3380    #[doc = "| Parameter | Description | Units |"]
3381    #[doc = "| --------- | ----------- | ----- |"]
3382    #[doc = "| 1         | User defined|  |"]
3383    #[doc = "| 2         | User defined|  |"]
3384    #[doc = "| 3         | User defined|  |"]
3385    #[doc = "| 4         | User defined|  |"]
3386    #[doc = "| 5 (Latitude)| Latitude unscaled|  |"]
3387    #[doc = "| 6 (Longitude)| Longitude unscaled|  |"]
3388    #[doc = "| 7 (Altitude)| Altitude (MSL)| m |"]
3389    MAV_CMD_WAYPOINT_USER_5 = 31004,
3390    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
3391    #[doc = ""]
3392    #[doc = "# Parameters"]
3393    #[doc = ""]
3394    #[doc = "| Parameter | Description | Units |"]
3395    #[doc = "| --------- | ----------- | ----- |"]
3396    #[doc = "| 1         | User defined|  |"]
3397    #[doc = "| 2         | User defined|  |"]
3398    #[doc = "| 3         | User defined|  |"]
3399    #[doc = "| 4         | User defined|  |"]
3400    #[doc = "| 5 (Latitude)| Latitude unscaled|  |"]
3401    #[doc = "| 6 (Longitude)| Longitude unscaled|  |"]
3402    #[doc = "| 7 (Altitude)| Altitude (MSL)| m |"]
3403    MAV_CMD_SPATIAL_USER_1 = 31005,
3404    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
3405    #[doc = ""]
3406    #[doc = "# Parameters"]
3407    #[doc = ""]
3408    #[doc = "| Parameter | Description | Units |"]
3409    #[doc = "| --------- | ----------- | ----- |"]
3410    #[doc = "| 1         | User defined|  |"]
3411    #[doc = "| 2         | User defined|  |"]
3412    #[doc = "| 3         | User defined|  |"]
3413    #[doc = "| 4         | User defined|  |"]
3414    #[doc = "| 5 (Latitude)| Latitude unscaled|  |"]
3415    #[doc = "| 6 (Longitude)| Longitude unscaled|  |"]
3416    #[doc = "| 7 (Altitude)| Altitude (MSL)| m |"]
3417    MAV_CMD_SPATIAL_USER_2 = 31006,
3418    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
3419    #[doc = ""]
3420    #[doc = "# Parameters"]
3421    #[doc = ""]
3422    #[doc = "| Parameter | Description | Units |"]
3423    #[doc = "| --------- | ----------- | ----- |"]
3424    #[doc = "| 1         | User defined|  |"]
3425    #[doc = "| 2         | User defined|  |"]
3426    #[doc = "| 3         | User defined|  |"]
3427    #[doc = "| 4         | User defined|  |"]
3428    #[doc = "| 5 (Latitude)| Latitude unscaled|  |"]
3429    #[doc = "| 6 (Longitude)| Longitude unscaled|  |"]
3430    #[doc = "| 7 (Altitude)| Altitude (MSL)| m |"]
3431    MAV_CMD_SPATIAL_USER_3 = 31007,
3432    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
3433    #[doc = ""]
3434    #[doc = "# Parameters"]
3435    #[doc = ""]
3436    #[doc = "| Parameter | Description | Units |"]
3437    #[doc = "| --------- | ----------- | ----- |"]
3438    #[doc = "| 1         | User defined|  |"]
3439    #[doc = "| 2         | User defined|  |"]
3440    #[doc = "| 3         | User defined|  |"]
3441    #[doc = "| 4         | User defined|  |"]
3442    #[doc = "| 5 (Latitude)| Latitude unscaled|  |"]
3443    #[doc = "| 6 (Longitude)| Longitude unscaled|  |"]
3444    #[doc = "| 7 (Altitude)| Altitude (MSL)| m |"]
3445    MAV_CMD_SPATIAL_USER_4 = 31008,
3446    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
3447    #[doc = ""]
3448    #[doc = "# Parameters"]
3449    #[doc = ""]
3450    #[doc = "| Parameter | Description | Units |"]
3451    #[doc = "| --------- | ----------- | ----- |"]
3452    #[doc = "| 1         | User defined|  |"]
3453    #[doc = "| 2         | User defined|  |"]
3454    #[doc = "| 3         | User defined|  |"]
3455    #[doc = "| 4         | User defined|  |"]
3456    #[doc = "| 5 (Latitude)| Latitude unscaled|  |"]
3457    #[doc = "| 6 (Longitude)| Longitude unscaled|  |"]
3458    #[doc = "| 7 (Altitude)| Altitude (MSL)| m |"]
3459    MAV_CMD_SPATIAL_USER_5 = 31009,
3460    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
3461    #[doc = ""]
3462    #[doc = "# Parameters"]
3463    #[doc = ""]
3464    #[doc = "| Parameter | Description |"]
3465    #[doc = "| --------- | ----------- |"]
3466    #[doc = "| 1         | User defined|"]
3467    #[doc = "| 2         | User defined|"]
3468    #[doc = "| 3         | User defined|"]
3469    #[doc = "| 4         | User defined|"]
3470    #[doc = "| 5         | User defined|"]
3471    #[doc = "| 6         | User defined|"]
3472    #[doc = "| 7         | User defined|"]
3473    MAV_CMD_USER_1 = 31010,
3474    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
3475    #[doc = ""]
3476    #[doc = "# Parameters"]
3477    #[doc = ""]
3478    #[doc = "| Parameter | Description |"]
3479    #[doc = "| --------- | ----------- |"]
3480    #[doc = "| 1         | User defined|"]
3481    #[doc = "| 2         | User defined|"]
3482    #[doc = "| 3         | User defined|"]
3483    #[doc = "| 4         | User defined|"]
3484    #[doc = "| 5         | User defined|"]
3485    #[doc = "| 6         | User defined|"]
3486    #[doc = "| 7         | User defined|"]
3487    MAV_CMD_USER_2 = 31011,
3488    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
3489    #[doc = ""]
3490    #[doc = "# Parameters"]
3491    #[doc = ""]
3492    #[doc = "| Parameter | Description |"]
3493    #[doc = "| --------- | ----------- |"]
3494    #[doc = "| 1         | User defined|"]
3495    #[doc = "| 2         | User defined|"]
3496    #[doc = "| 3         | User defined|"]
3497    #[doc = "| 4         | User defined|"]
3498    #[doc = "| 5         | User defined|"]
3499    #[doc = "| 6         | User defined|"]
3500    #[doc = "| 7         | User defined|"]
3501    MAV_CMD_USER_3 = 31012,
3502    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
3503    #[doc = ""]
3504    #[doc = "# Parameters"]
3505    #[doc = ""]
3506    #[doc = "| Parameter | Description |"]
3507    #[doc = "| --------- | ----------- |"]
3508    #[doc = "| 1         | User defined|"]
3509    #[doc = "| 2         | User defined|"]
3510    #[doc = "| 3         | User defined|"]
3511    #[doc = "| 4         | User defined|"]
3512    #[doc = "| 5         | User defined|"]
3513    #[doc = "| 6         | User defined|"]
3514    #[doc = "| 7         | User defined|"]
3515    MAV_CMD_USER_4 = 31013,
3516    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
3517    #[doc = ""]
3518    #[doc = "# Parameters"]
3519    #[doc = ""]
3520    #[doc = "| Parameter | Description |"]
3521    #[doc = "| --------- | ----------- |"]
3522    #[doc = "| 1         | User defined|"]
3523    #[doc = "| 2         | User defined|"]
3524    #[doc = "| 3         | User defined|"]
3525    #[doc = "| 4         | User defined|"]
3526    #[doc = "| 5         | User defined|"]
3527    #[doc = "| 6         | User defined|"]
3528    #[doc = "| 7         | User defined|"]
3529    MAV_CMD_USER_5 = 31014,
3530    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
3531    #[doc = ""]
3532    #[doc = "# Parameters"]
3533    #[doc = ""]
3534    #[doc = "| Parameter | Description |"]
3535    #[doc = "| --------- | ----------- |"]
3536    #[doc = "| 1 (bus)   | Bus number (0 to disable forwarding, 1 for first bus, 2 for 2nd bus, 3 for 3rd bus).|"]
3537    #[doc = "| 2         | Empty.      |"]
3538    #[doc = "| 3         | Empty.      |"]
3539    #[doc = "| 4         | Empty.      |"]
3540    #[doc = "| 5         | Empty.      |"]
3541    #[doc = "| 6         | Empty.      |"]
3542    #[doc = "| 7         | Empty.      |"]
3543    MAV_CMD_CAN_FORWARD = 32000,
3544}
3545impl MavCmd {
3546    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
3547}
3548impl Default for MavCmd {
3549    fn default() -> Self {
3550        Self::DEFAULT
3551    }
3552}
3553#[cfg_attr(feature = "ts", derive(TS))]
3554#[cfg_attr(feature = "ts", ts(export))]
3555#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3556#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3557#[cfg_attr(feature = "serde", serde(tag = "type"))]
3558#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3559#[repr(u32)]
3560#[doc = "Possible actions an aircraft can take to avoid a collision."]
3561pub enum MavCollisionAction {
3562    #[doc = "Ignore any potential collisions"]
3563    MAV_COLLISION_ACTION_NONE = 0,
3564    #[doc = "Report potential collision"]
3565    MAV_COLLISION_ACTION_REPORT = 1,
3566    #[doc = "Ascend or Descend to avoid threat"]
3567    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
3568    #[doc = "Move horizontally to avoid threat"]
3569    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
3570    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
3571    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
3572    #[doc = "Aircraft to fly directly back to its launch point"]
3573    MAV_COLLISION_ACTION_RTL = 5,
3574    #[doc = "Aircraft to stop in place"]
3575    MAV_COLLISION_ACTION_HOVER = 6,
3576}
3577impl MavCollisionAction {
3578    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
3579}
3580impl Default for MavCollisionAction {
3581    fn default() -> Self {
3582        Self::DEFAULT
3583    }
3584}
3585#[cfg_attr(feature = "ts", derive(TS))]
3586#[cfg_attr(feature = "ts", ts(export))]
3587#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3588#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3589#[cfg_attr(feature = "serde", serde(tag = "type"))]
3590#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3591#[repr(u32)]
3592#[doc = "Source of information about this collision."]
3593pub enum MavCollisionSrc {
3594    #[doc = "ID field references ADSB_VEHICLE packets"]
3595    MAV_COLLISION_SRC_ADSB = 0,
3596    #[doc = "ID field references MAVLink SRC ID"]
3597    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
3598}
3599impl MavCollisionSrc {
3600    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
3601}
3602impl Default for MavCollisionSrc {
3603    fn default() -> Self {
3604        Self::DEFAULT
3605    }
3606}
3607#[cfg_attr(feature = "ts", derive(TS))]
3608#[cfg_attr(feature = "ts", ts(export))]
3609#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3610#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3611#[cfg_attr(feature = "serde", serde(tag = "type"))]
3612#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3613#[repr(u32)]
3614#[doc = "Aircraft-rated danger from this threat."]
3615pub enum MavCollisionThreatLevel {
3616    #[doc = "Not a threat"]
3617    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
3618    #[doc = "Craft is mildly concerned about this threat"]
3619    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
3620    #[doc = "Craft is panicking, and may take actions to avoid threat"]
3621    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
3622}
3623impl MavCollisionThreatLevel {
3624    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
3625}
3626impl Default for MavCollisionThreatLevel {
3627    fn default() -> Self {
3628        Self::DEFAULT
3629    }
3630}
3631#[cfg_attr(feature = "ts", derive(TS))]
3632#[cfg_attr(feature = "ts", ts(export))]
3633#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3634#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3635#[cfg_attr(feature = "serde", serde(tag = "type"))]
3636#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3637#[repr(u32)]
3638#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
3639pub enum MavComponent {
3640    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
3641    MAV_COMP_ID_ALL = 0,
3642    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
3643    MAV_COMP_ID_AUTOPILOT1 = 1,
3644    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3645    MAV_COMP_ID_USER1 = 25,
3646    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3647    MAV_COMP_ID_USER2 = 26,
3648    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3649    MAV_COMP_ID_USER3 = 27,
3650    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3651    MAV_COMP_ID_USER4 = 28,
3652    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3653    MAV_COMP_ID_USER5 = 29,
3654    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3655    MAV_COMP_ID_USER6 = 30,
3656    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3657    MAV_COMP_ID_USER7 = 31,
3658    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3659    MAV_COMP_ID_USER8 = 32,
3660    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3661    MAV_COMP_ID_USER9 = 33,
3662    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3663    MAV_COMP_ID_USER10 = 34,
3664    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3665    MAV_COMP_ID_USER11 = 35,
3666    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3667    MAV_COMP_ID_USER12 = 36,
3668    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3669    MAV_COMP_ID_USER13 = 37,
3670    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3671    MAV_COMP_ID_USER14 = 38,
3672    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3673    MAV_COMP_ID_USER15 = 39,
3674    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3675    MAV_COMP_ID_USER16 = 40,
3676    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3677    MAV_COMP_ID_USER17 = 41,
3678    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3679    MAV_COMP_ID_USER18 = 42,
3680    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3681    MAV_COMP_ID_USER19 = 43,
3682    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3683    MAV_COMP_ID_USER20 = 44,
3684    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3685    MAV_COMP_ID_USER21 = 45,
3686    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3687    MAV_COMP_ID_USER22 = 46,
3688    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3689    MAV_COMP_ID_USER23 = 47,
3690    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3691    MAV_COMP_ID_USER24 = 48,
3692    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3693    MAV_COMP_ID_USER25 = 49,
3694    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3695    MAV_COMP_ID_USER26 = 50,
3696    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3697    MAV_COMP_ID_USER27 = 51,
3698    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3699    MAV_COMP_ID_USER28 = 52,
3700    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3701    MAV_COMP_ID_USER29 = 53,
3702    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3703    MAV_COMP_ID_USER30 = 54,
3704    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3705    MAV_COMP_ID_USER31 = 55,
3706    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3707    MAV_COMP_ID_USER32 = 56,
3708    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3709    MAV_COMP_ID_USER33 = 57,
3710    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3711    MAV_COMP_ID_USER34 = 58,
3712    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3713    MAV_COMP_ID_USER35 = 59,
3714    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3715    MAV_COMP_ID_USER36 = 60,
3716    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3717    MAV_COMP_ID_USER37 = 61,
3718    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3719    MAV_COMP_ID_USER38 = 62,
3720    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3721    MAV_COMP_ID_USER39 = 63,
3722    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3723    MAV_COMP_ID_USER40 = 64,
3724    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3725    MAV_COMP_ID_USER41 = 65,
3726    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3727    MAV_COMP_ID_USER42 = 66,
3728    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3729    MAV_COMP_ID_USER43 = 67,
3730    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
3731    MAV_COMP_ID_TELEMETRY_RADIO = 68,
3732    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3733    MAV_COMP_ID_USER45 = 69,
3734    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3735    MAV_COMP_ID_USER46 = 70,
3736    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3737    MAV_COMP_ID_USER47 = 71,
3738    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3739    MAV_COMP_ID_USER48 = 72,
3740    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3741    MAV_COMP_ID_USER49 = 73,
3742    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3743    MAV_COMP_ID_USER50 = 74,
3744    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3745    MAV_COMP_ID_USER51 = 75,
3746    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3747    MAV_COMP_ID_USER52 = 76,
3748    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3749    MAV_COMP_ID_USER53 = 77,
3750    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3751    MAV_COMP_ID_USER54 = 78,
3752    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3753    MAV_COMP_ID_USER55 = 79,
3754    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3755    MAV_COMP_ID_USER56 = 80,
3756    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3757    MAV_COMP_ID_USER57 = 81,
3758    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3759    MAV_COMP_ID_USER58 = 82,
3760    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3761    MAV_COMP_ID_USER59 = 83,
3762    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3763    MAV_COMP_ID_USER60 = 84,
3764    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3765    MAV_COMP_ID_USER61 = 85,
3766    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3767    MAV_COMP_ID_USER62 = 86,
3768    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3769    MAV_COMP_ID_USER63 = 87,
3770    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3771    MAV_COMP_ID_USER64 = 88,
3772    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3773    MAV_COMP_ID_USER65 = 89,
3774    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3775    MAV_COMP_ID_USER66 = 90,
3776    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3777    MAV_COMP_ID_USER67 = 91,
3778    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3779    MAV_COMP_ID_USER68 = 92,
3780    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3781    MAV_COMP_ID_USER69 = 93,
3782    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3783    MAV_COMP_ID_USER70 = 94,
3784    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3785    MAV_COMP_ID_USER71 = 95,
3786    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3787    MAV_COMP_ID_USER72 = 96,
3788    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3789    MAV_COMP_ID_USER73 = 97,
3790    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3791    MAV_COMP_ID_USER74 = 98,
3792    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
3793    MAV_COMP_ID_USER75 = 99,
3794    #[doc = "Camera #1."]
3795    MAV_COMP_ID_CAMERA = 100,
3796    #[doc = "Camera #2."]
3797    MAV_COMP_ID_CAMERA2 = 101,
3798    #[doc = "Camera #3."]
3799    MAV_COMP_ID_CAMERA3 = 102,
3800    #[doc = "Camera #4."]
3801    MAV_COMP_ID_CAMERA4 = 103,
3802    #[doc = "Camera #5."]
3803    MAV_COMP_ID_CAMERA5 = 104,
3804    #[doc = "Camera #6."]
3805    MAV_COMP_ID_CAMERA6 = 105,
3806    #[doc = "Servo #1."]
3807    MAV_COMP_ID_SERVO1 = 140,
3808    #[doc = "Servo #2."]
3809    MAV_COMP_ID_SERVO2 = 141,
3810    #[doc = "Servo #3."]
3811    MAV_COMP_ID_SERVO3 = 142,
3812    #[doc = "Servo #4."]
3813    MAV_COMP_ID_SERVO4 = 143,
3814    #[doc = "Servo #5."]
3815    MAV_COMP_ID_SERVO5 = 144,
3816    #[doc = "Servo #6."]
3817    MAV_COMP_ID_SERVO6 = 145,
3818    #[doc = "Servo #7."]
3819    MAV_COMP_ID_SERVO7 = 146,
3820    #[doc = "Servo #8."]
3821    MAV_COMP_ID_SERVO8 = 147,
3822    #[doc = "Servo #9."]
3823    MAV_COMP_ID_SERVO9 = 148,
3824    #[doc = "Servo #10."]
3825    MAV_COMP_ID_SERVO10 = 149,
3826    #[doc = "Servo #11."]
3827    MAV_COMP_ID_SERVO11 = 150,
3828    #[doc = "Servo #12."]
3829    MAV_COMP_ID_SERVO12 = 151,
3830    #[doc = "Servo #13."]
3831    MAV_COMP_ID_SERVO13 = 152,
3832    #[doc = "Servo #14."]
3833    MAV_COMP_ID_SERVO14 = 153,
3834    #[doc = "Gimbal #1."]
3835    MAV_COMP_ID_GIMBAL = 154,
3836    #[doc = "Logging component."]
3837    MAV_COMP_ID_LOG = 155,
3838    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
3839    MAV_COMP_ID_ADSB = 156,
3840    #[doc = "On Screen Display (OSD) devices for video links."]
3841    MAV_COMP_ID_OSD = 157,
3842    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
3843    MAV_COMP_ID_PERIPHERAL = 158,
3844    #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
3845    #[doc = "Gimbal ID for QX1."]
3846    MAV_COMP_ID_QX1_GIMBAL = 159,
3847    #[doc = "FLARM collision alert component."]
3848    MAV_COMP_ID_FLARM = 160,
3849    #[doc = "Parachute component."]
3850    MAV_COMP_ID_PARACHUTE = 161,
3851    #[doc = "Winch component."]
3852    MAV_COMP_ID_WINCH = 169,
3853    #[doc = "Gimbal #2."]
3854    MAV_COMP_ID_GIMBAL2 = 171,
3855    #[doc = "Gimbal #3."]
3856    MAV_COMP_ID_GIMBAL3 = 172,
3857    #[doc = "Gimbal #4"]
3858    MAV_COMP_ID_GIMBAL4 = 173,
3859    #[doc = "Gimbal #5."]
3860    MAV_COMP_ID_GIMBAL5 = 174,
3861    #[doc = "Gimbal #6."]
3862    MAV_COMP_ID_GIMBAL6 = 175,
3863    #[doc = "Battery #1."]
3864    MAV_COMP_ID_BATTERY = 180,
3865    #[doc = "Battery #2."]
3866    MAV_COMP_ID_BATTERY2 = 181,
3867    #[doc = "CAN over MAVLink client."]
3868    MAV_COMP_ID_MAVCAN = 189,
3869    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
3870    MAV_COMP_ID_MISSIONPLANNER = 190,
3871    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
3872    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
3873    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
3874    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
3875    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
3876    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
3877    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
3878    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
3879    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
3880    MAV_COMP_ID_PATHPLANNER = 195,
3881    #[doc = "Component that plans a collision free path between two points."]
3882    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
3883    #[doc = "Component that provides position estimates using VIO techniques."]
3884    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
3885    #[doc = "Component that manages pairing of vehicle and GCS."]
3886    MAV_COMP_ID_PAIRING_MANAGER = 198,
3887    #[doc = "Inertial Measurement Unit (IMU) #1."]
3888    MAV_COMP_ID_IMU = 200,
3889    #[doc = "Inertial Measurement Unit (IMU) #2."]
3890    MAV_COMP_ID_IMU_2 = 201,
3891    #[doc = "Inertial Measurement Unit (IMU) #3."]
3892    MAV_COMP_ID_IMU_3 = 202,
3893    #[doc = "GPS #1."]
3894    MAV_COMP_ID_GPS = 220,
3895    #[doc = "GPS #2."]
3896    MAV_COMP_ID_GPS2 = 221,
3897    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
3898    MAV_COMP_ID_ODID_TXRX_1 = 236,
3899    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
3900    MAV_COMP_ID_ODID_TXRX_2 = 237,
3901    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
3902    MAV_COMP_ID_ODID_TXRX_3 = 238,
3903    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
3904    MAV_COMP_ID_UDP_BRIDGE = 240,
3905    #[doc = "Component to bridge to UART (i.e. from UDP)."]
3906    MAV_COMP_ID_UART_BRIDGE = 241,
3907    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
3908    MAV_COMP_ID_TUNNEL_NODE = 242,
3909    #[doc = "Illuminator"]
3910    MAV_COMP_ID_ILLUMINATOR = 243,
3911    #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
3912    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
3913    MAV_COMP_ID_SYSTEM_CONTROL = 250,
3914}
3915impl MavComponent {
3916    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
3917}
3918impl Default for MavComponent {
3919    fn default() -> Self {
3920        Self::DEFAULT
3921    }
3922}
3923#[cfg_attr(feature = "ts", derive(TS))]
3924#[cfg_attr(feature = "ts", ts(export))]
3925#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3926#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3927#[cfg_attr(feature = "serde", serde(tag = "type"))]
3928#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3929#[repr(u32)]
3930#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
3931#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
3932pub enum MavDataStream {
3933    #[doc = "Enable all data streams"]
3934    MAV_DATA_STREAM_ALL = 0,
3935    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
3936    MAV_DATA_STREAM_RAW_SENSORS = 1,
3937    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
3938    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
3939    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
3940    MAV_DATA_STREAM_RC_CHANNELS = 3,
3941    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
3942    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
3943    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
3944    MAV_DATA_STREAM_POSITION = 6,
3945    #[doc = "Dependent on the autopilot"]
3946    MAV_DATA_STREAM_EXTRA1 = 10,
3947    #[doc = "Dependent on the autopilot"]
3948    MAV_DATA_STREAM_EXTRA2 = 11,
3949    #[doc = "Dependent on the autopilot"]
3950    MAV_DATA_STREAM_EXTRA3 = 12,
3951}
3952impl MavDataStream {
3953    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
3954}
3955impl Default for MavDataStream {
3956    fn default() -> Self {
3957        Self::DEFAULT
3958    }
3959}
3960#[cfg_attr(feature = "ts", derive(TS))]
3961#[cfg_attr(feature = "ts", ts(export))]
3962#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3963#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3964#[cfg_attr(feature = "serde", serde(tag = "type"))]
3965#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3966#[repr(u32)]
3967#[doc = "Enumeration of distance sensor types"]
3968pub enum MavDistanceSensor {
3969    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
3970    MAV_DISTANCE_SENSOR_LASER = 0,
3971    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
3972    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
3973    #[doc = "Infrared rangefinder, e.g. Sharp units"]
3974    MAV_DISTANCE_SENSOR_INFRARED = 2,
3975    #[doc = "Radar type, e.g. uLanding units"]
3976    MAV_DISTANCE_SENSOR_RADAR = 3,
3977    #[doc = "Broken or unknown type, e.g. analog units"]
3978    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
3979}
3980impl MavDistanceSensor {
3981    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
3982}
3983impl Default for MavDistanceSensor {
3984    fn default() -> Self {
3985        Self::DEFAULT
3986    }
3987}
3988#[cfg_attr(feature = "ts", derive(TS))]
3989#[cfg_attr(feature = "ts", ts(export))]
3990#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3991#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3992#[cfg_attr(feature = "serde", serde(tag = "type"))]
3993#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3994#[repr(u32)]
3995#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
3996pub enum MavDoRepositionFlags {
3997    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
3998    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
3999}
4000impl MavDoRepositionFlags {
4001    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
4002}
4003impl Default for MavDoRepositionFlags {
4004    fn default() -> Self {
4005        Self::DEFAULT
4006    }
4007}
4008#[cfg_attr(feature = "ts", derive(TS))]
4009#[cfg_attr(feature = "ts", ts(export))]
4010#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4011#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4012#[cfg_attr(feature = "serde", serde(tag = "type"))]
4013#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4014#[repr(u32)]
4015#[doc = "Enumeration of estimator types"]
4016pub enum MavEstimatorType {
4017    #[doc = "Unknown type of the estimator."]
4018    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
4019    #[doc = "This is a naive estimator without any real covariance feedback."]
4020    MAV_ESTIMATOR_TYPE_NAIVE = 1,
4021    #[doc = "Computer vision based estimate. Might be up to scale."]
4022    MAV_ESTIMATOR_TYPE_VISION = 2,
4023    #[doc = "Visual-inertial estimate."]
4024    MAV_ESTIMATOR_TYPE_VIO = 3,
4025    #[doc = "Plain GPS estimate."]
4026    MAV_ESTIMATOR_TYPE_GPS = 4,
4027    #[doc = "Estimator integrating GPS and inertial sensing."]
4028    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
4029    #[doc = "Estimate from external motion capturing system."]
4030    MAV_ESTIMATOR_TYPE_MOCAP = 6,
4031    #[doc = "Estimator based on lidar sensor input."]
4032    MAV_ESTIMATOR_TYPE_LIDAR = 7,
4033    #[doc = "Estimator on autopilot."]
4034    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
4035}
4036impl MavEstimatorType {
4037    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
4038}
4039impl Default for MavEstimatorType {
4040    fn default() -> Self {
4041        Self::DEFAULT
4042    }
4043}
4044#[cfg_attr(feature = "ts", derive(TS))]
4045#[cfg_attr(feature = "ts", ts(export))]
4046#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4047#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4048#[cfg_attr(feature = "serde", serde(tag = "type"))]
4049#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4050#[repr(u32)]
4051#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
4052pub enum MavEventCurrentSequenceFlags {
4053    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
4054    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
4055}
4056impl MavEventCurrentSequenceFlags {
4057    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
4058}
4059impl Default for MavEventCurrentSequenceFlags {
4060    fn default() -> Self {
4061        Self::DEFAULT
4062    }
4063}
4064#[cfg_attr(feature = "ts", derive(TS))]
4065#[cfg_attr(feature = "ts", ts(export))]
4066#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4067#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4068#[cfg_attr(feature = "serde", serde(tag = "type"))]
4069#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4070#[repr(u32)]
4071#[doc = "Reason for an event error response."]
4072pub enum MavEventErrorReason {
4073    #[doc = "The requested event is not available (anymore)."]
4074    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
4075}
4076impl MavEventErrorReason {
4077    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
4078}
4079impl Default for MavEventErrorReason {
4080    fn default() -> Self {
4081        Self::DEFAULT
4082    }
4083}
4084#[cfg_attr(feature = "ts", derive(TS))]
4085#[cfg_attr(feature = "ts", ts(export))]
4086#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4087#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4088#[cfg_attr(feature = "serde", serde(tag = "type"))]
4089#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4090#[repr(u32)]
4091#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
4092pub enum MavFrame {
4093    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
4094    MAV_FRAME_GLOBAL = 0,
4095    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
4096    MAV_FRAME_LOCAL_NED = 1,
4097    #[doc = "NOT a coordinate frame, indicates a mission command."]
4098    MAV_FRAME_MISSION = 2,
4099    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
4100    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
4101    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
4102    MAV_FRAME_LOCAL_ENU = 4,
4103    #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
4104    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
4105    MAV_FRAME_GLOBAL_INT = 5,
4106    #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
4107    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
4108    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
4109    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
4110    MAV_FRAME_LOCAL_OFFSET_NED = 7,
4111    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
4112    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
4113    MAV_FRAME_BODY_NED = 8,
4114    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
4115    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
4116    MAV_FRAME_BODY_OFFSET_NED = 9,
4117    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
4118    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
4119    #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
4120    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
4121    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
4122    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
4123    MAV_FRAME_BODY_FRD = 12,
4124    #[deprecated = "  (Deprecated since 2019-04)"]
4125    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
4126    MAV_FRAME_RESERVED_13 = 13,
4127    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
4128    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
4129    MAV_FRAME_RESERVED_14 = 14,
4130    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
4131    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
4132    MAV_FRAME_RESERVED_15 = 15,
4133    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
4134    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
4135    MAV_FRAME_RESERVED_16 = 16,
4136    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
4137    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
4138    MAV_FRAME_RESERVED_17 = 17,
4139    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
4140    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
4141    MAV_FRAME_RESERVED_18 = 18,
4142    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
4143    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
4144    MAV_FRAME_RESERVED_19 = 19,
4145    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
4146    MAV_FRAME_LOCAL_FRD = 20,
4147    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
4148    MAV_FRAME_LOCAL_FLU = 21,
4149}
4150impl MavFrame {
4151    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
4152}
4153impl Default for MavFrame {
4154    fn default() -> Self {
4155        Self::DEFAULT
4156    }
4157}
4158#[cfg_attr(feature = "ts", derive(TS))]
4159#[cfg_attr(feature = "ts", ts(export))]
4160#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4161#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4162#[cfg_attr(feature = "serde", serde(tag = "type"))]
4163#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4164#[repr(u32)]
4165#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
4166pub enum MavFtpErr {
4167    #[doc = "None: No error"]
4168    MAV_FTP_ERR_NONE = 0,
4169    #[doc = "Fail: Unknown failure"]
4170    MAV_FTP_ERR_FAIL = 1,
4171    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
4172    MAV_FTP_ERR_FAILERRNO = 2,
4173    #[doc = "InvalidDataSize: Payload size is invalid"]
4174    MAV_FTP_ERR_INVALIDDATASIZE = 3,
4175    #[doc = "InvalidSession: Session is not currently open"]
4176    MAV_FTP_ERR_INVALIDSESSION = 4,
4177    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
4178    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
4179    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
4180    MAV_FTP_ERR_EOF = 6,
4181    #[doc = "UnknownCommand: Unknown command / opcode"]
4182    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
4183    #[doc = "FileExists: File/directory already exists"]
4184    MAV_FTP_ERR_FILEEXISTS = 8,
4185    #[doc = "FileProtected: File/directory is write protected"]
4186    MAV_FTP_ERR_FILEPROTECTED = 9,
4187    #[doc = "FileNotFound: File/directory not found"]
4188    MAV_FTP_ERR_FILENOTFOUND = 10,
4189}
4190impl MavFtpErr {
4191    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
4192}
4193impl Default for MavFtpErr {
4194    fn default() -> Self {
4195        Self::DEFAULT
4196    }
4197}
4198#[cfg_attr(feature = "ts", derive(TS))]
4199#[cfg_attr(feature = "ts", ts(export))]
4200#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4201#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4202#[cfg_attr(feature = "serde", serde(tag = "type"))]
4203#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4204#[repr(u32)]
4205#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
4206pub enum MavFtpOpcode {
4207    #[doc = "None. Ignored, always ACKed"]
4208    MAV_FTP_OPCODE_NONE = 0,
4209    #[doc = "TerminateSession: Terminates open Read session"]
4210    MAV_FTP_OPCODE_TERMINATESESSION = 1,
4211    #[doc = "ResetSessions: Terminates all open read sessions"]
4212    MAV_FTP_OPCODE_RESETSESSION = 2,
4213    #[doc = "ListDirectory. List files and directories in path from offset"]
4214    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
4215    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
4216    MAV_FTP_OPCODE_OPENFILERO = 4,
4217    #[doc = "ReadFile: Reads size bytes from offset in session"]
4218    MAV_FTP_OPCODE_READFILE = 5,
4219    #[doc = "CreateFile: Creates file at path for writing, returns session"]
4220    MAV_FTP_OPCODE_CREATEFILE = 6,
4221    #[doc = "WriteFile: Writes size bytes to offset in session"]
4222    MAV_FTP_OPCODE_WRITEFILE = 7,
4223    #[doc = "RemoveFile: Remove file at path"]
4224    MAV_FTP_OPCODE_REMOVEFILE = 8,
4225    #[doc = "CreateDirectory: Creates directory at path"]
4226    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
4227    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
4228    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
4229    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
4230    MAV_FTP_OPCODE_OPENFILEWO = 11,
4231    #[doc = "TruncateFile: Truncate file at path to offset length"]
4232    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
4233    #[doc = "Rename: Rename path1 to path2"]
4234    MAV_FTP_OPCODE_RENAME = 13,
4235    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
4236    MAV_FTP_OPCODE_CALCFILECRC = 14,
4237    #[doc = "BurstReadFile: Burst download session file"]
4238    MAV_FTP_OPCODE_BURSTREADFILE = 15,
4239    #[doc = "ACK: ACK response"]
4240    MAV_FTP_OPCODE_ACK = 128,
4241    #[doc = "NAK: NAK response"]
4242    MAV_FTP_OPCODE_NAK = 129,
4243}
4244impl MavFtpOpcode {
4245    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
4246}
4247impl Default for MavFtpOpcode {
4248    fn default() -> Self {
4249        Self::DEFAULT
4250    }
4251}
4252#[cfg_attr(feature = "ts", derive(TS))]
4253#[cfg_attr(feature = "ts", ts(export))]
4254#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4255#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4256#[cfg_attr(feature = "serde", serde(tag = "type"))]
4257#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4258#[repr(u32)]
4259#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
4260pub enum MavFuelType {
4261    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
4262    MAV_FUEL_TYPE_UNKNOWN = 0,
4263    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
4264    MAV_FUEL_TYPE_LIQUID = 1,
4265    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
4266    MAV_FUEL_TYPE_GAS = 2,
4267}
4268impl MavFuelType {
4269    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
4270}
4271impl Default for MavFuelType {
4272    fn default() -> Self {
4273        Self::DEFAULT
4274    }
4275}
4276bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
4277impl MavGeneratorStatusFlag {
4278    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
4279}
4280impl Default for MavGeneratorStatusFlag {
4281    fn default() -> Self {
4282        Self::DEFAULT
4283    }
4284}
4285#[cfg_attr(feature = "ts", derive(TS))]
4286#[cfg_attr(feature = "ts", ts(export))]
4287#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4288#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4289#[cfg_attr(feature = "serde", serde(tag = "type"))]
4290#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4291#[repr(u32)]
4292#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
4293pub enum MavGoto {
4294    #[doc = "Hold at the current position."]
4295    MAV_GOTO_DO_HOLD = 0,
4296    #[doc = "Continue with the next item in mission execution."]
4297    MAV_GOTO_DO_CONTINUE = 1,
4298    #[doc = "Hold at the current position of the system"]
4299    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
4300    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
4301    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
4302}
4303impl MavGoto {
4304    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
4305}
4306impl Default for MavGoto {
4307    fn default() -> Self {
4308        Self::DEFAULT
4309    }
4310}
4311#[cfg_attr(feature = "ts", derive(TS))]
4312#[cfg_attr(feature = "ts", ts(export))]
4313#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4314#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4315#[cfg_attr(feature = "serde", serde(tag = "type"))]
4316#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4317#[repr(u32)]
4318#[doc = "Enumeration of landed detector states"]
4319pub enum MavLandedState {
4320    #[doc = "MAV landed state is unknown"]
4321    MAV_LANDED_STATE_UNDEFINED = 0,
4322    #[doc = "MAV is landed (on ground)"]
4323    MAV_LANDED_STATE_ON_GROUND = 1,
4324    #[doc = "MAV is in air"]
4325    MAV_LANDED_STATE_IN_AIR = 2,
4326    #[doc = "MAV currently taking off"]
4327    MAV_LANDED_STATE_TAKEOFF = 3,
4328    #[doc = "MAV currently landing"]
4329    MAV_LANDED_STATE_LANDING = 4,
4330}
4331impl MavLandedState {
4332    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
4333}
4334impl Default for MavLandedState {
4335    fn default() -> Self {
4336        Self::DEFAULT
4337    }
4338}
4339#[cfg_attr(feature = "ts", derive(TS))]
4340#[cfg_attr(feature = "ts", ts(export))]
4341#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4342#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4343#[cfg_attr(feature = "serde", serde(tag = "type"))]
4344#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4345#[repr(u32)]
4346#[doc = "Result of mission operation (in a MISSION_ACK message)."]
4347pub enum MavMissionResult {
4348    #[doc = "mission accepted OK"]
4349    MAV_MISSION_ACCEPTED = 0,
4350    #[doc = "Generic error / not accepting mission commands at all right now."]
4351    MAV_MISSION_ERROR = 1,
4352    #[doc = "Coordinate frame is not supported."]
4353    MAV_MISSION_UNSUPPORTED_FRAME = 2,
4354    #[doc = "Command is not supported."]
4355    MAV_MISSION_UNSUPPORTED = 3,
4356    #[doc = "Mission items exceed storage space."]
4357    MAV_MISSION_NO_SPACE = 4,
4358    #[doc = "One of the parameters has an invalid value."]
4359    MAV_MISSION_INVALID = 5,
4360    #[doc = "param1 has an invalid value."]
4361    MAV_MISSION_INVALID_PARAM1 = 6,
4362    #[doc = "param2 has an invalid value."]
4363    MAV_MISSION_INVALID_PARAM2 = 7,
4364    #[doc = "param3 has an invalid value."]
4365    MAV_MISSION_INVALID_PARAM3 = 8,
4366    #[doc = "param4 has an invalid value."]
4367    MAV_MISSION_INVALID_PARAM4 = 9,
4368    #[doc = "x / param5 has an invalid value."]
4369    MAV_MISSION_INVALID_PARAM5_X = 10,
4370    #[doc = "y / param6 has an invalid value."]
4371    MAV_MISSION_INVALID_PARAM6_Y = 11,
4372    #[doc = "z / param7 has an invalid value."]
4373    MAV_MISSION_INVALID_PARAM7 = 12,
4374    #[doc = "Mission item received out of sequence"]
4375    MAV_MISSION_INVALID_SEQUENCE = 13,
4376    #[doc = "Not accepting any mission commands from this communication partner."]
4377    MAV_MISSION_DENIED = 14,
4378    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
4379    MAV_MISSION_OPERATION_CANCELLED = 15,
4380}
4381impl MavMissionResult {
4382    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
4383}
4384impl Default for MavMissionResult {
4385    fn default() -> Self {
4386        Self::DEFAULT
4387    }
4388}
4389#[cfg_attr(feature = "ts", derive(TS))]
4390#[cfg_attr(feature = "ts", ts(export))]
4391#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4392#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4393#[cfg_attr(feature = "serde", serde(tag = "type"))]
4394#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4395#[repr(u32)]
4396#[doc = "Type of mission items being requested/sent in mission protocol."]
4397pub enum MavMissionType {
4398    #[doc = "Items are mission commands for main mission."]
4399    MAV_MISSION_TYPE_MISSION = 0,
4400    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
4401    MAV_MISSION_TYPE_FENCE = 1,
4402    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
4403    MAV_MISSION_TYPE_RALLY = 2,
4404    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
4405    MAV_MISSION_TYPE_ALL = 255,
4406}
4407impl MavMissionType {
4408    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
4409}
4410impl Default for MavMissionType {
4411    fn default() -> Self {
4412        Self::DEFAULT
4413    }
4414}
4415#[cfg_attr(feature = "ts", derive(TS))]
4416#[cfg_attr(feature = "ts", ts(export))]
4417#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4418#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4419#[cfg_attr(feature = "serde", serde(tag = "type"))]
4420#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4421#[repr(u32)]
4422#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
4423pub enum MavMode {
4424    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
4425    MAV_MODE_PREFLIGHT = 0,
4426    #[doc = "System is allowed to be active, under assisted RC control."]
4427    MAV_MODE_STABILIZE_DISARMED = 80,
4428    #[doc = "System is allowed to be active, under assisted RC control."]
4429    MAV_MODE_STABILIZE_ARMED = 208,
4430    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
4431    MAV_MODE_MANUAL_DISARMED = 64,
4432    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
4433    MAV_MODE_MANUAL_ARMED = 192,
4434    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
4435    MAV_MODE_GUIDED_DISARMED = 88,
4436    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
4437    MAV_MODE_GUIDED_ARMED = 216,
4438    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
4439    MAV_MODE_AUTO_DISARMED = 92,
4440    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
4441    MAV_MODE_AUTO_ARMED = 220,
4442    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
4443    MAV_MODE_TEST_DISARMED = 66,
4444    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
4445    MAV_MODE_TEST_ARMED = 194,
4446}
4447impl MavMode {
4448    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
4449}
4450impl Default for MavMode {
4451    fn default() -> Self {
4452        Self::DEFAULT
4453    }
4454}
4455bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
4456impl MavModeFlag {
4457    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
4458}
4459impl Default for MavModeFlag {
4460    fn default() -> Self {
4461        Self::DEFAULT
4462    }
4463}
4464#[cfg_attr(feature = "ts", derive(TS))]
4465#[cfg_attr(feature = "ts", ts(export))]
4466#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4467#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4468#[cfg_attr(feature = "serde", serde(tag = "type"))]
4469#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4470#[repr(u32)]
4471#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
4472pub enum MavModeFlagDecodePosition {
4473    #[doc = "First bit:  10000000"]
4474    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
4475    #[doc = "Second bit: 01000000"]
4476    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
4477    #[doc = "Third bit:  00100000"]
4478    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
4479    #[doc = "Fourth bit: 00010000"]
4480    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
4481    #[doc = "Fifth bit:  00001000"]
4482    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
4483    #[doc = "Sixth bit:   00000100"]
4484    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
4485    #[doc = "Seventh bit: 00000010"]
4486    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
4487    #[doc = "Eighth bit: 00000001"]
4488    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
4489}
4490impl MavModeFlagDecodePosition {
4491    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
4492}
4493impl Default for MavModeFlagDecodePosition {
4494    fn default() -> Self {
4495        Self::DEFAULT
4496    }
4497}
4498bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
4499impl MavModeProperty {
4500    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
4501}
4502impl Default for MavModeProperty {
4503    fn default() -> Self {
4504        Self::DEFAULT
4505    }
4506}
4507#[cfg_attr(feature = "ts", derive(TS))]
4508#[cfg_attr(feature = "ts", ts(export))]
4509#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4510#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4511#[cfg_attr(feature = "serde", serde(tag = "type"))]
4512#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4513#[repr(u32)]
4514#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
4515#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
4516pub enum MavMountMode {
4517    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
4518    MAV_MOUNT_MODE_RETRACT = 0,
4519    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
4520    MAV_MOUNT_MODE_NEUTRAL = 1,
4521    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
4522    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
4523    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
4524    MAV_MOUNT_MODE_RC_TARGETING = 3,
4525    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
4526    MAV_MOUNT_MODE_GPS_POINT = 4,
4527    #[doc = "Gimbal tracks system with specified system ID"]
4528    MAV_MOUNT_MODE_SYSID_TARGET = 5,
4529    #[doc = "Gimbal tracks home position"]
4530    MAV_MOUNT_MODE_HOME_LOCATION = 6,
4531}
4532impl MavMountMode {
4533    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
4534}
4535impl Default for MavMountMode {
4536    fn default() -> Self {
4537        Self::DEFAULT
4538    }
4539}
4540#[cfg_attr(feature = "ts", derive(TS))]
4541#[cfg_attr(feature = "ts", ts(export))]
4542#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4543#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4544#[cfg_attr(feature = "serde", serde(tag = "type"))]
4545#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4546#[repr(u32)]
4547pub enum MavOdidArmStatus {
4548    #[doc = "Passing arming checks."]
4549    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
4550    #[doc = "Generic arming failure, see error string for details."]
4551    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
4552}
4553impl MavOdidArmStatus {
4554    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
4555}
4556impl Default for MavOdidArmStatus {
4557    fn default() -> Self {
4558        Self::DEFAULT
4559    }
4560}
4561#[cfg_attr(feature = "ts", derive(TS))]
4562#[cfg_attr(feature = "ts", ts(export))]
4563#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4564#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4565#[cfg_attr(feature = "serde", serde(tag = "type"))]
4566#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4567#[repr(u32)]
4568pub enum MavOdidAuthType {
4569    #[doc = "No authentication type is specified."]
4570    MAV_ODID_AUTH_TYPE_NONE = 0,
4571    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
4572    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
4573    #[doc = "Signature for the Operator ID."]
4574    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
4575    #[doc = "Signature for the entire message set."]
4576    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
4577    #[doc = "Authentication is provided by Network Remote ID."]
4578    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
4579    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
4580    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
4581}
4582impl MavOdidAuthType {
4583    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
4584}
4585impl Default for MavOdidAuthType {
4586    fn default() -> Self {
4587        Self::DEFAULT
4588    }
4589}
4590#[cfg_attr(feature = "ts", derive(TS))]
4591#[cfg_attr(feature = "ts", ts(export))]
4592#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4593#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4594#[cfg_attr(feature = "serde", serde(tag = "type"))]
4595#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4596#[repr(u32)]
4597pub enum MavOdidCategoryEu {
4598    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
4599    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
4600    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
4601    MAV_ODID_CATEGORY_EU_OPEN = 1,
4602    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
4603    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
4604    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
4605    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
4606}
4607impl MavOdidCategoryEu {
4608    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
4609}
4610impl Default for MavOdidCategoryEu {
4611    fn default() -> Self {
4612        Self::DEFAULT
4613    }
4614}
4615#[cfg_attr(feature = "ts", derive(TS))]
4616#[cfg_attr(feature = "ts", ts(export))]
4617#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4618#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4619#[cfg_attr(feature = "serde", serde(tag = "type"))]
4620#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4621#[repr(u32)]
4622pub enum MavOdidClassEu {
4623    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
4624    MAV_ODID_CLASS_EU_UNDECLARED = 0,
4625    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
4626    MAV_ODID_CLASS_EU_CLASS_0 = 1,
4627    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
4628    MAV_ODID_CLASS_EU_CLASS_1 = 2,
4629    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
4630    MAV_ODID_CLASS_EU_CLASS_2 = 3,
4631    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
4632    MAV_ODID_CLASS_EU_CLASS_3 = 4,
4633    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
4634    MAV_ODID_CLASS_EU_CLASS_4 = 5,
4635    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
4636    MAV_ODID_CLASS_EU_CLASS_5 = 6,
4637    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
4638    MAV_ODID_CLASS_EU_CLASS_6 = 7,
4639}
4640impl MavOdidClassEu {
4641    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
4642}
4643impl Default for MavOdidClassEu {
4644    fn default() -> Self {
4645        Self::DEFAULT
4646    }
4647}
4648#[cfg_attr(feature = "ts", derive(TS))]
4649#[cfg_attr(feature = "ts", ts(export))]
4650#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4651#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4652#[cfg_attr(feature = "serde", serde(tag = "type"))]
4653#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4654#[repr(u32)]
4655pub enum MavOdidClassificationType {
4656    #[doc = "The classification type for the UA is undeclared."]
4657    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
4658    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
4659    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
4660}
4661impl MavOdidClassificationType {
4662    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
4663}
4664impl Default for MavOdidClassificationType {
4665    fn default() -> Self {
4666        Self::DEFAULT
4667    }
4668}
4669#[cfg_attr(feature = "ts", derive(TS))]
4670#[cfg_attr(feature = "ts", ts(export))]
4671#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4672#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4673#[cfg_attr(feature = "serde", serde(tag = "type"))]
4674#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4675#[repr(u32)]
4676pub enum MavOdidDescType {
4677    #[doc = "Optional free-form text description of the purpose of the flight."]
4678    MAV_ODID_DESC_TYPE_TEXT = 0,
4679    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
4680    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
4681    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
4682    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
4683}
4684impl MavOdidDescType {
4685    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
4686}
4687impl Default for MavOdidDescType {
4688    fn default() -> Self {
4689        Self::DEFAULT
4690    }
4691}
4692#[cfg_attr(feature = "ts", derive(TS))]
4693#[cfg_attr(feature = "ts", ts(export))]
4694#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4695#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4696#[cfg_attr(feature = "serde", serde(tag = "type"))]
4697#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4698#[repr(u32)]
4699pub enum MavOdidHeightRef {
4700    #[doc = "The height field is relative to the take-off location."]
4701    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
4702    #[doc = "The height field is relative to ground."]
4703    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
4704}
4705impl MavOdidHeightRef {
4706    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
4707}
4708impl Default for MavOdidHeightRef {
4709    fn default() -> Self {
4710        Self::DEFAULT
4711    }
4712}
4713#[cfg_attr(feature = "ts", derive(TS))]
4714#[cfg_attr(feature = "ts", ts(export))]
4715#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4716#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4717#[cfg_attr(feature = "serde", serde(tag = "type"))]
4718#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4719#[repr(u32)]
4720pub enum MavOdidHorAcc {
4721    #[doc = "The horizontal accuracy is unknown."]
4722    MAV_ODID_HOR_ACC_UNKNOWN = 0,
4723    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
4724    MAV_ODID_HOR_ACC_10NM = 1,
4725    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
4726    MAV_ODID_HOR_ACC_4NM = 2,
4727    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
4728    MAV_ODID_HOR_ACC_2NM = 3,
4729    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
4730    MAV_ODID_HOR_ACC_1NM = 4,
4731    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
4732    MAV_ODID_HOR_ACC_0_5NM = 5,
4733    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
4734    MAV_ODID_HOR_ACC_0_3NM = 6,
4735    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
4736    MAV_ODID_HOR_ACC_0_1NM = 7,
4737    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
4738    MAV_ODID_HOR_ACC_0_05NM = 8,
4739    #[doc = "The horizontal accuracy is smaller than 30 meter."]
4740    MAV_ODID_HOR_ACC_30_METER = 9,
4741    #[doc = "The horizontal accuracy is smaller than 10 meter."]
4742    MAV_ODID_HOR_ACC_10_METER = 10,
4743    #[doc = "The horizontal accuracy is smaller than 3 meter."]
4744    MAV_ODID_HOR_ACC_3_METER = 11,
4745    #[doc = "The horizontal accuracy is smaller than 1 meter."]
4746    MAV_ODID_HOR_ACC_1_METER = 12,
4747}
4748impl MavOdidHorAcc {
4749    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
4750}
4751impl Default for MavOdidHorAcc {
4752    fn default() -> Self {
4753        Self::DEFAULT
4754    }
4755}
4756#[cfg_attr(feature = "ts", derive(TS))]
4757#[cfg_attr(feature = "ts", ts(export))]
4758#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4759#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4760#[cfg_attr(feature = "serde", serde(tag = "type"))]
4761#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4762#[repr(u32)]
4763pub enum MavOdidIdType {
4764    #[doc = "No type defined."]
4765    MAV_ODID_ID_TYPE_NONE = 0,
4766    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
4767    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
4768    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
4769    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
4770    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
4771    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
4772    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
4773    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
4774}
4775impl MavOdidIdType {
4776    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
4777}
4778impl Default for MavOdidIdType {
4779    fn default() -> Self {
4780        Self::DEFAULT
4781    }
4782}
4783#[cfg_attr(feature = "ts", derive(TS))]
4784#[cfg_attr(feature = "ts", ts(export))]
4785#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4786#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4787#[cfg_attr(feature = "serde", serde(tag = "type"))]
4788#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4789#[repr(u32)]
4790pub enum MavOdidOperatorIdType {
4791    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
4792    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
4793}
4794impl MavOdidOperatorIdType {
4795    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
4796}
4797impl Default for MavOdidOperatorIdType {
4798    fn default() -> Self {
4799        Self::DEFAULT
4800    }
4801}
4802#[cfg_attr(feature = "ts", derive(TS))]
4803#[cfg_attr(feature = "ts", ts(export))]
4804#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4805#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4806#[cfg_attr(feature = "serde", serde(tag = "type"))]
4807#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4808#[repr(u32)]
4809pub enum MavOdidOperatorLocationType {
4810    #[doc = "The location/altitude of the operator is the same as the take-off location."]
4811    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
4812    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
4813    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
4814    #[doc = "The location/altitude of the operator are fixed values."]
4815    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
4816}
4817impl MavOdidOperatorLocationType {
4818    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
4819}
4820impl Default for MavOdidOperatorLocationType {
4821    fn default() -> Self {
4822        Self::DEFAULT
4823    }
4824}
4825#[cfg_attr(feature = "ts", derive(TS))]
4826#[cfg_attr(feature = "ts", ts(export))]
4827#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4828#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4829#[cfg_attr(feature = "serde", serde(tag = "type"))]
4830#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4831#[repr(u32)]
4832pub enum MavOdidSpeedAcc {
4833    #[doc = "The speed accuracy is unknown."]
4834    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
4835    #[doc = "The speed accuracy is smaller than 10 meters per second."]
4836    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
4837    #[doc = "The speed accuracy is smaller than 3 meters per second."]
4838    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
4839    #[doc = "The speed accuracy is smaller than 1 meters per second."]
4840    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
4841    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
4842    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
4843}
4844impl MavOdidSpeedAcc {
4845    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
4846}
4847impl Default for MavOdidSpeedAcc {
4848    fn default() -> Self {
4849        Self::DEFAULT
4850    }
4851}
4852#[cfg_attr(feature = "ts", derive(TS))]
4853#[cfg_attr(feature = "ts", ts(export))]
4854#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4855#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4856#[cfg_attr(feature = "serde", serde(tag = "type"))]
4857#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4858#[repr(u32)]
4859pub enum MavOdidStatus {
4860    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
4861    MAV_ODID_STATUS_UNDECLARED = 0,
4862    #[doc = "The UA is on the ground."]
4863    MAV_ODID_STATUS_GROUND = 1,
4864    #[doc = "The UA is in the air."]
4865    MAV_ODID_STATUS_AIRBORNE = 2,
4866    #[doc = "The UA is having an emergency."]
4867    MAV_ODID_STATUS_EMERGENCY = 3,
4868    #[doc = "The remote ID system is failing or unreliable in some way."]
4869    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
4870}
4871impl MavOdidStatus {
4872    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
4873}
4874impl Default for MavOdidStatus {
4875    fn default() -> Self {
4876        Self::DEFAULT
4877    }
4878}
4879#[cfg_attr(feature = "ts", derive(TS))]
4880#[cfg_attr(feature = "ts", ts(export))]
4881#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4882#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4883#[cfg_attr(feature = "serde", serde(tag = "type"))]
4884#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4885#[repr(u32)]
4886pub enum MavOdidTimeAcc {
4887    #[doc = "The timestamp accuracy is unknown."]
4888    MAV_ODID_TIME_ACC_UNKNOWN = 0,
4889    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
4890    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
4891    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
4892    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
4893    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
4894    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
4895    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
4896    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
4897    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
4898    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
4899    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
4900    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
4901    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
4902    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
4903    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
4904    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
4905    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
4906    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
4907    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
4908    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
4909    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
4910    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
4911    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
4912    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
4913    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
4914    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
4915    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
4916    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
4917    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
4918    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
4919}
4920impl MavOdidTimeAcc {
4921    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
4922}
4923impl Default for MavOdidTimeAcc {
4924    fn default() -> Self {
4925        Self::DEFAULT
4926    }
4927}
4928#[cfg_attr(feature = "ts", derive(TS))]
4929#[cfg_attr(feature = "ts", ts(export))]
4930#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4931#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4932#[cfg_attr(feature = "serde", serde(tag = "type"))]
4933#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4934#[repr(u32)]
4935pub enum MavOdidUaType {
4936    #[doc = "No UA (Unmanned Aircraft) type defined."]
4937    MAV_ODID_UA_TYPE_NONE = 0,
4938    #[doc = "Aeroplane/Airplane. Fixed wing."]
4939    MAV_ODID_UA_TYPE_AEROPLANE = 1,
4940    #[doc = "Helicopter or multirotor."]
4941    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
4942    #[doc = "Gyroplane."]
4943    MAV_ODID_UA_TYPE_GYROPLANE = 3,
4944    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
4945    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
4946    #[doc = "Ornithopter."]
4947    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
4948    #[doc = "Glider."]
4949    MAV_ODID_UA_TYPE_GLIDER = 6,
4950    #[doc = "Kite."]
4951    MAV_ODID_UA_TYPE_KITE = 7,
4952    #[doc = "Free Balloon."]
4953    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
4954    #[doc = "Captive Balloon."]
4955    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
4956    #[doc = "Airship. E.g. a blimp."]
4957    MAV_ODID_UA_TYPE_AIRSHIP = 10,
4958    #[doc = "Free Fall/Parachute (unpowered)."]
4959    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
4960    #[doc = "Rocket."]
4961    MAV_ODID_UA_TYPE_ROCKET = 12,
4962    #[doc = "Tethered powered aircraft."]
4963    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
4964    #[doc = "Ground Obstacle."]
4965    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
4966    #[doc = "Other type of aircraft not listed earlier."]
4967    MAV_ODID_UA_TYPE_OTHER = 15,
4968}
4969impl MavOdidUaType {
4970    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
4971}
4972impl Default for MavOdidUaType {
4973    fn default() -> Self {
4974        Self::DEFAULT
4975    }
4976}
4977#[cfg_attr(feature = "ts", derive(TS))]
4978#[cfg_attr(feature = "ts", ts(export))]
4979#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4980#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4981#[cfg_attr(feature = "serde", serde(tag = "type"))]
4982#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4983#[repr(u32)]
4984pub enum MavOdidVerAcc {
4985    #[doc = "The vertical accuracy is unknown."]
4986    MAV_ODID_VER_ACC_UNKNOWN = 0,
4987    #[doc = "The vertical accuracy is smaller than 150 meter."]
4988    MAV_ODID_VER_ACC_150_METER = 1,
4989    #[doc = "The vertical accuracy is smaller than 45 meter."]
4990    MAV_ODID_VER_ACC_45_METER = 2,
4991    #[doc = "The vertical accuracy is smaller than 25 meter."]
4992    MAV_ODID_VER_ACC_25_METER = 3,
4993    #[doc = "The vertical accuracy is smaller than 10 meter."]
4994    MAV_ODID_VER_ACC_10_METER = 4,
4995    #[doc = "The vertical accuracy is smaller than 3 meter."]
4996    MAV_ODID_VER_ACC_3_METER = 5,
4997    #[doc = "The vertical accuracy is smaller than 1 meter."]
4998    MAV_ODID_VER_ACC_1_METER = 6,
4999}
5000impl MavOdidVerAcc {
5001    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
5002}
5003impl Default for MavOdidVerAcc {
5004    fn default() -> Self {
5005        Self::DEFAULT
5006    }
5007}
5008#[cfg_attr(feature = "ts", derive(TS))]
5009#[cfg_attr(feature = "ts", ts(export))]
5010#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5011#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5012#[cfg_attr(feature = "serde", serde(tag = "type"))]
5013#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5014#[repr(u32)]
5015#[doc = "Specifies the datatype of a MAVLink extended parameter."]
5016pub enum MavParamExtType {
5017    #[doc = "8-bit unsigned integer"]
5018    MAV_PARAM_EXT_TYPE_UINT8 = 1,
5019    #[doc = "8-bit signed integer"]
5020    MAV_PARAM_EXT_TYPE_INT8 = 2,
5021    #[doc = "16-bit unsigned integer"]
5022    MAV_PARAM_EXT_TYPE_UINT16 = 3,
5023    #[doc = "16-bit signed integer"]
5024    MAV_PARAM_EXT_TYPE_INT16 = 4,
5025    #[doc = "32-bit unsigned integer"]
5026    MAV_PARAM_EXT_TYPE_UINT32 = 5,
5027    #[doc = "32-bit signed integer"]
5028    MAV_PARAM_EXT_TYPE_INT32 = 6,
5029    #[doc = "64-bit unsigned integer"]
5030    MAV_PARAM_EXT_TYPE_UINT64 = 7,
5031    #[doc = "64-bit signed integer"]
5032    MAV_PARAM_EXT_TYPE_INT64 = 8,
5033    #[doc = "32-bit floating-point"]
5034    MAV_PARAM_EXT_TYPE_REAL32 = 9,
5035    #[doc = "64-bit floating-point"]
5036    MAV_PARAM_EXT_TYPE_REAL64 = 10,
5037    #[doc = "Custom Type"]
5038    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
5039}
5040impl MavParamExtType {
5041    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
5042}
5043impl Default for MavParamExtType {
5044    fn default() -> Self {
5045        Self::DEFAULT
5046    }
5047}
5048#[cfg_attr(feature = "ts", derive(TS))]
5049#[cfg_attr(feature = "ts", ts(export))]
5050#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5051#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5052#[cfg_attr(feature = "serde", serde(tag = "type"))]
5053#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5054#[repr(u32)]
5055#[doc = "Specifies the datatype of a MAVLink parameter."]
5056pub enum MavParamType {
5057    #[doc = "8-bit unsigned integer"]
5058    MAV_PARAM_TYPE_UINT8 = 1,
5059    #[doc = "8-bit signed integer"]
5060    MAV_PARAM_TYPE_INT8 = 2,
5061    #[doc = "16-bit unsigned integer"]
5062    MAV_PARAM_TYPE_UINT16 = 3,
5063    #[doc = "16-bit signed integer"]
5064    MAV_PARAM_TYPE_INT16 = 4,
5065    #[doc = "32-bit unsigned integer"]
5066    MAV_PARAM_TYPE_UINT32 = 5,
5067    #[doc = "32-bit signed integer"]
5068    MAV_PARAM_TYPE_INT32 = 6,
5069    #[doc = "64-bit unsigned integer"]
5070    MAV_PARAM_TYPE_UINT64 = 7,
5071    #[doc = "64-bit signed integer"]
5072    MAV_PARAM_TYPE_INT64 = 8,
5073    #[doc = "32-bit floating-point"]
5074    MAV_PARAM_TYPE_REAL32 = 9,
5075    #[doc = "64-bit floating-point"]
5076    MAV_PARAM_TYPE_REAL64 = 10,
5077}
5078impl MavParamType {
5079    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
5080}
5081impl Default for MavParamType {
5082    fn default() -> Self {
5083        Self::DEFAULT
5084    }
5085}
5086bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
5087impl MavPowerStatus {
5088    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
5089}
5090impl Default for MavPowerStatus {
5091    fn default() -> Self {
5092        Self::DEFAULT
5093    }
5094}
5095bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
5096impl MavProtocolCapability {
5097    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
5098}
5099impl Default for MavProtocolCapability {
5100    fn default() -> Self {
5101        Self::DEFAULT
5102    }
5103}
5104#[cfg_attr(feature = "ts", derive(TS))]
5105#[cfg_attr(feature = "ts", ts(export))]
5106#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5107#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5108#[cfg_attr(feature = "serde", serde(tag = "type"))]
5109#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5110#[repr(u32)]
5111#[doc = "Result from a MAVLink command (MAV_CMD)"]
5112pub enum MavResult {
5113    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
5114    MAV_RESULT_ACCEPTED = 0,
5115    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
5116    MAV_RESULT_TEMPORARILY_REJECTED = 1,
5117    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
5118    MAV_RESULT_DENIED = 2,
5119    #[doc = "Command is not supported (unknown)."]
5120    MAV_RESULT_UNSUPPORTED = 3,
5121    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
5122    MAV_RESULT_FAILED = 4,
5123    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
5124    MAV_RESULT_IN_PROGRESS = 5,
5125    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
5126    MAV_RESULT_CANCELLED = 6,
5127    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
5128    MAV_RESULT_COMMAND_LONG_ONLY = 7,
5129    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
5130    MAV_RESULT_COMMAND_INT_ONLY = 8,
5131    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
5132    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
5133}
5134impl MavResult {
5135    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
5136}
5137impl Default for MavResult {
5138    fn default() -> Self {
5139        Self::DEFAULT
5140    }
5141}
5142#[cfg_attr(feature = "ts", derive(TS))]
5143#[cfg_attr(feature = "ts", ts(export))]
5144#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5145#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5146#[cfg_attr(feature = "serde", serde(tag = "type"))]
5147#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5148#[repr(u32)]
5149#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
5150#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
5151pub enum MavRoi {
5152    #[doc = "No region of interest."]
5153    MAV_ROI_NONE = 0,
5154    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
5155    MAV_ROI_WPNEXT = 1,
5156    #[doc = "Point toward given waypoint."]
5157    MAV_ROI_WPINDEX = 2,
5158    #[doc = "Point toward fixed location."]
5159    MAV_ROI_LOCATION = 3,
5160    #[doc = "Point toward of given id."]
5161    MAV_ROI_TARGET = 4,
5162}
5163impl MavRoi {
5164    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
5165}
5166impl Default for MavRoi {
5167    fn default() -> Self {
5168        Self::DEFAULT
5169    }
5170}
5171#[cfg_attr(feature = "ts", derive(TS))]
5172#[cfg_attr(feature = "ts", ts(export))]
5173#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5174#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5175#[cfg_attr(feature = "serde", serde(tag = "type"))]
5176#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5177#[repr(u32)]
5178#[doc = "Enumeration of sensor orientation, according to its rotations"]
5179pub enum MavSensorOrientation {
5180    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
5181    MAV_SENSOR_ROTATION_NONE = 0,
5182    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
5183    MAV_SENSOR_ROTATION_YAW_45 = 1,
5184    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
5185    MAV_SENSOR_ROTATION_YAW_90 = 2,
5186    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
5187    MAV_SENSOR_ROTATION_YAW_135 = 3,
5188    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
5189    MAV_SENSOR_ROTATION_YAW_180 = 4,
5190    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
5191    MAV_SENSOR_ROTATION_YAW_225 = 5,
5192    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
5193    MAV_SENSOR_ROTATION_YAW_270 = 6,
5194    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
5195    MAV_SENSOR_ROTATION_YAW_315 = 7,
5196    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
5197    MAV_SENSOR_ROTATION_ROLL_180 = 8,
5198    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
5199    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
5200    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
5201    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
5202    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
5203    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
5204    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
5205    MAV_SENSOR_ROTATION_PITCH_180 = 12,
5206    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
5207    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
5208    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
5209    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
5210    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
5211    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
5212    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
5213    MAV_SENSOR_ROTATION_ROLL_90 = 16,
5214    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
5215    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
5216    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
5217    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
5218    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
5219    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
5220    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
5221    MAV_SENSOR_ROTATION_ROLL_270 = 20,
5222    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
5223    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
5224    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
5225    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
5226    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
5227    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
5228    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
5229    MAV_SENSOR_ROTATION_PITCH_90 = 24,
5230    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
5231    MAV_SENSOR_ROTATION_PITCH_270 = 25,
5232    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
5233    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
5234    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
5235    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
5236    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
5237    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
5238    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
5239    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
5240    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
5241    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
5242    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
5243    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
5244    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
5245    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
5246    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
5247    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
5248    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
5249    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
5250    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
5251    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
5252    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
5253    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
5254    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
5255    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
5256    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
5257    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
5258    #[doc = "Pitch: 315"]
5259    MAV_SENSOR_ROTATION_PITCH_315 = 39,
5260    #[doc = "Roll: 90, Pitch: 315"]
5261    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
5262    #[doc = "Custom orientation"]
5263    MAV_SENSOR_ROTATION_CUSTOM = 100,
5264}
5265impl MavSensorOrientation {
5266    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
5267}
5268impl Default for MavSensorOrientation {
5269    fn default() -> Self {
5270        Self::DEFAULT
5271    }
5272}
5273#[cfg_attr(feature = "ts", derive(TS))]
5274#[cfg_attr(feature = "ts", ts(export))]
5275#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5276#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5277#[cfg_attr(feature = "serde", serde(tag = "type"))]
5278#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5279#[repr(u32)]
5280#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
5281pub enum MavSeverity {
5282    #[doc = "System is unusable. This is a \"panic\" condition."]
5283    MAV_SEVERITY_EMERGENCY = 0,
5284    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
5285    MAV_SEVERITY_ALERT = 1,
5286    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
5287    MAV_SEVERITY_CRITICAL = 2,
5288    #[doc = "Indicates an error in secondary/redundant systems."]
5289    MAV_SEVERITY_ERROR = 3,
5290    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
5291    MAV_SEVERITY_WARNING = 4,
5292    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
5293    MAV_SEVERITY_NOTICE = 5,
5294    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
5295    MAV_SEVERITY_INFO = 6,
5296    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
5297    MAV_SEVERITY_DEBUG = 7,
5298}
5299impl MavSeverity {
5300    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
5301}
5302impl Default for MavSeverity {
5303    fn default() -> Self {
5304        Self::DEFAULT
5305    }
5306}
5307#[cfg_attr(feature = "ts", derive(TS))]
5308#[cfg_attr(feature = "ts", ts(export))]
5309#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5310#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5311#[cfg_attr(feature = "serde", serde(tag = "type"))]
5312#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5313#[repr(u32)]
5314#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
5315pub enum MavStandardMode {
5316    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
5317    MAV_STANDARD_MODE_NON_STANDARD = 0,
5318    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
5319    MAV_STANDARD_MODE_POSITION_HOLD = 1,
5320    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
5321    MAV_STANDARD_MODE_ORBIT = 2,
5322    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
5323    MAV_STANDARD_MODE_CRUISE = 3,
5324    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
5325    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
5326    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
5327    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
5328    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
5329    MAV_STANDARD_MODE_MISSION = 6,
5330    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
5331    MAV_STANDARD_MODE_LAND = 7,
5332    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
5333    MAV_STANDARD_MODE_TAKEOFF = 8,
5334}
5335impl MavStandardMode {
5336    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
5337}
5338impl Default for MavStandardMode {
5339    fn default() -> Self {
5340        Self::DEFAULT
5341    }
5342}
5343#[cfg_attr(feature = "ts", derive(TS))]
5344#[cfg_attr(feature = "ts", ts(export))]
5345#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5346#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5347#[cfg_attr(feature = "serde", serde(tag = "type"))]
5348#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5349#[repr(u32)]
5350pub enum MavState {
5351    #[doc = "Uninitialized system, state is unknown."]
5352    MAV_STATE_UNINIT = 0,
5353    #[doc = "System is booting up."]
5354    MAV_STATE_BOOT = 1,
5355    #[doc = "System is calibrating and not flight-ready."]
5356    MAV_STATE_CALIBRATING = 2,
5357    #[doc = "System is grounded and on standby. It can be launched any time."]
5358    MAV_STATE_STANDBY = 3,
5359    #[doc = "System is active and might be already airborne. Motors are engaged."]
5360    MAV_STATE_ACTIVE = 4,
5361    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
5362    MAV_STATE_CRITICAL = 5,
5363    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
5364    MAV_STATE_EMERGENCY = 6,
5365    #[doc = "System just initialized its power-down sequence, will shut down now."]
5366    MAV_STATE_POWEROFF = 7,
5367    #[doc = "System is terminating itself (failsafe or commanded)."]
5368    MAV_STATE_FLIGHT_TERMINATION = 8,
5369}
5370impl MavState {
5371    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
5372}
5373impl Default for MavState {
5374    fn default() -> Self {
5375        Self::DEFAULT
5376    }
5377}
5378bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
5379impl MavSysStatusSensor {
5380    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
5381}
5382impl Default for MavSysStatusSensor {
5383    fn default() -> Self {
5384        Self::DEFAULT
5385    }
5386}
5387bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
5388impl MavSysStatusSensorExtended {
5389    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
5390}
5391impl Default for MavSysStatusSensorExtended {
5392    fn default() -> Self {
5393        Self::DEFAULT
5394    }
5395}
5396#[cfg_attr(feature = "ts", derive(TS))]
5397#[cfg_attr(feature = "ts", ts(export))]
5398#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5399#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5400#[cfg_attr(feature = "serde", serde(tag = "type"))]
5401#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5402#[repr(u32)]
5403pub enum MavTunnelPayloadType {
5404    #[doc = "Encoding of payload unknown."]
5405    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
5406    #[doc = "Registered for STorM32 gimbal controller."]
5407    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
5408    #[doc = "Registered for STorM32 gimbal controller."]
5409    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
5410    #[doc = "Registered for STorM32 gimbal controller."]
5411    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
5412    #[doc = "Registered for STorM32 gimbal controller."]
5413    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
5414    #[doc = "Registered for STorM32 gimbal controller."]
5415    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
5416    #[doc = "Registered for STorM32 gimbal controller."]
5417    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
5418    #[doc = "Registered for STorM32 gimbal controller."]
5419    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
5420    #[doc = "Registered for STorM32 gimbal controller."]
5421    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
5422    #[doc = "Registered for STorM32 gimbal controller."]
5423    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
5424    #[doc = "Registered for STorM32 gimbal controller."]
5425    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
5426    #[doc = "Registered for ModalAI remote OSD protocol."]
5427    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
5428    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
5429    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
5430    #[doc = "Registered for ModalAI vendor use."]
5431    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
5432}
5433impl MavTunnelPayloadType {
5434    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
5435}
5436impl Default for MavTunnelPayloadType {
5437    fn default() -> Self {
5438        Self::DEFAULT
5439    }
5440}
5441#[cfg_attr(feature = "ts", derive(TS))]
5442#[cfg_attr(feature = "ts", ts(export))]
5443#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5444#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5445#[cfg_attr(feature = "serde", serde(tag = "type"))]
5446#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5447#[repr(u32)]
5448#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
5449pub enum MavType {
5450    #[doc = "Generic micro air vehicle"]
5451    MAV_TYPE_GENERIC = 0,
5452    #[doc = "Fixed wing aircraft."]
5453    MAV_TYPE_FIXED_WING = 1,
5454    #[doc = "Quadrotor"]
5455    MAV_TYPE_QUADROTOR = 2,
5456    #[doc = "Coaxial helicopter"]
5457    MAV_TYPE_COAXIAL = 3,
5458    #[doc = "Normal helicopter with tail rotor."]
5459    MAV_TYPE_HELICOPTER = 4,
5460    #[doc = "Ground installation"]
5461    MAV_TYPE_ANTENNA_TRACKER = 5,
5462    #[doc = "Operator control unit / ground control station"]
5463    MAV_TYPE_GCS = 6,
5464    #[doc = "Airship, controlled"]
5465    MAV_TYPE_AIRSHIP = 7,
5466    #[doc = "Free balloon, uncontrolled"]
5467    MAV_TYPE_FREE_BALLOON = 8,
5468    #[doc = "Rocket"]
5469    MAV_TYPE_ROCKET = 9,
5470    #[doc = "Ground rover"]
5471    MAV_TYPE_GROUND_ROVER = 10,
5472    #[doc = "Surface vessel, boat, ship"]
5473    MAV_TYPE_SURFACE_BOAT = 11,
5474    #[doc = "Submarine"]
5475    MAV_TYPE_SUBMARINE = 12,
5476    #[doc = "Hexarotor"]
5477    MAV_TYPE_HEXAROTOR = 13,
5478    #[doc = "Octorotor"]
5479    MAV_TYPE_OCTOROTOR = 14,
5480    #[doc = "Tricopter"]
5481    MAV_TYPE_TRICOPTER = 15,
5482    #[doc = "Flapping wing"]
5483    MAV_TYPE_FLAPPING_WING = 16,
5484    #[doc = "Kite"]
5485    MAV_TYPE_KITE = 17,
5486    #[doc = "Onboard companion controller"]
5487    MAV_TYPE_ONBOARD_CONTROLLER = 18,
5488    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
5489    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
5490    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
5491    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
5492    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
5493    MAV_TYPE_VTOL_TILTROTOR = 21,
5494    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
5495    MAV_TYPE_VTOL_FIXEDROTOR = 22,
5496    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
5497    MAV_TYPE_VTOL_TAILSITTER = 23,
5498    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
5499    MAV_TYPE_VTOL_TILTWING = 24,
5500    #[doc = "VTOL reserved 5"]
5501    MAV_TYPE_VTOL_RESERVED5 = 25,
5502    #[doc = "Gimbal"]
5503    MAV_TYPE_GIMBAL = 26,
5504    #[doc = "ADSB system"]
5505    MAV_TYPE_ADSB = 27,
5506    #[doc = "Steerable, nonrigid airfoil"]
5507    MAV_TYPE_PARAFOIL = 28,
5508    #[doc = "Dodecarotor"]
5509    MAV_TYPE_DODECAROTOR = 29,
5510    #[doc = "Camera"]
5511    MAV_TYPE_CAMERA = 30,
5512    #[doc = "Charging station"]
5513    MAV_TYPE_CHARGING_STATION = 31,
5514    #[doc = "FLARM collision avoidance system"]
5515    MAV_TYPE_FLARM = 32,
5516    #[doc = "Servo"]
5517    MAV_TYPE_SERVO = 33,
5518    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
5519    MAV_TYPE_ODID = 34,
5520    #[doc = "Decarotor"]
5521    MAV_TYPE_DECAROTOR = 35,
5522    #[doc = "Battery"]
5523    MAV_TYPE_BATTERY = 36,
5524    #[doc = "Parachute"]
5525    MAV_TYPE_PARACHUTE = 37,
5526    #[doc = "Log"]
5527    MAV_TYPE_LOG = 38,
5528    #[doc = "OSD"]
5529    MAV_TYPE_OSD = 39,
5530    #[doc = "IMU"]
5531    MAV_TYPE_IMU = 40,
5532    #[doc = "GPS"]
5533    MAV_TYPE_GPS = 41,
5534    #[doc = "Winch"]
5535    MAV_TYPE_WINCH = 42,
5536    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
5537    MAV_TYPE_GENERIC_MULTIROTOR = 43,
5538    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
5539    MAV_TYPE_ILLUMINATOR = 44,
5540    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
5541    MAV_TYPE_SPACECRAFT_ORBITER = 45,
5542}
5543impl MavType {
5544    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
5545}
5546impl Default for MavType {
5547    fn default() -> Self {
5548        Self::DEFAULT
5549    }
5550}
5551#[cfg_attr(feature = "ts", derive(TS))]
5552#[cfg_attr(feature = "ts", ts(export))]
5553#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5554#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5555#[cfg_attr(feature = "serde", serde(tag = "type"))]
5556#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5557#[repr(u32)]
5558#[doc = "Enumeration of VTOL states"]
5559pub enum MavVtolState {
5560    #[doc = "MAV is not configured as VTOL"]
5561    MAV_VTOL_STATE_UNDEFINED = 0,
5562    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
5563    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
5564    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
5565    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
5566    #[doc = "VTOL is in multicopter state"]
5567    MAV_VTOL_STATE_MC = 3,
5568    #[doc = "VTOL is in fixed-wing state"]
5569    MAV_VTOL_STATE_FW = 4,
5570}
5571impl MavVtolState {
5572    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
5573}
5574impl Default for MavVtolState {
5575    fn default() -> Self {
5576        Self::DEFAULT
5577    }
5578}
5579bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
5580impl MavWinchStatusFlag {
5581    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
5582}
5583impl Default for MavWinchStatusFlag {
5584    fn default() -> Self {
5585        Self::DEFAULT
5586    }
5587}
5588#[cfg_attr(feature = "ts", derive(TS))]
5589#[cfg_attr(feature = "ts", ts(export))]
5590#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5591#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5592#[cfg_attr(feature = "serde", serde(tag = "type"))]
5593#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5594#[repr(u32)]
5595pub enum MavlinkDataStreamType {
5596    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
5597    MAVLINK_DATA_STREAM_IMG_BMP = 1,
5598    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
5599    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
5600    MAVLINK_DATA_STREAM_IMG_PGM = 4,
5601    MAVLINK_DATA_STREAM_IMG_PNG = 5,
5602}
5603impl MavlinkDataStreamType {
5604    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
5605}
5606impl Default for MavlinkDataStreamType {
5607    fn default() -> Self {
5608        Self::DEFAULT
5609    }
5610}
5611#[cfg_attr(feature = "ts", derive(TS))]
5612#[cfg_attr(feature = "ts", ts(export))]
5613#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5614#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5615#[cfg_attr(feature = "serde", serde(tag = "type"))]
5616#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5617#[repr(u32)]
5618#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
5619pub enum MissionState {
5620    #[doc = "The mission status reporting is not supported."]
5621    MISSION_STATE_UNKNOWN = 0,
5622    #[doc = "No mission on the vehicle."]
5623    MISSION_STATE_NO_MISSION = 1,
5624    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
5625    MISSION_STATE_NOT_STARTED = 2,
5626    #[doc = "Mission is active, and will execute mission items when in auto mode."]
5627    MISSION_STATE_ACTIVE = 3,
5628    #[doc = "Mission is paused when in auto mode."]
5629    MISSION_STATE_PAUSED = 4,
5630    #[doc = "Mission has executed all mission items."]
5631    MISSION_STATE_COMPLETE = 5,
5632}
5633impl MissionState {
5634    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
5635}
5636impl Default for MissionState {
5637    fn default() -> Self {
5638        Self::DEFAULT
5639    }
5640}
5641#[cfg_attr(feature = "ts", derive(TS))]
5642#[cfg_attr(feature = "ts", ts(export))]
5643#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5644#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5645#[cfg_attr(feature = "serde", serde(tag = "type"))]
5646#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5647#[repr(u32)]
5648#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
5649pub enum MotorTestOrder {
5650    #[doc = "Default autopilot motor test method."]
5651    MOTOR_TEST_ORDER_DEFAULT = 0,
5652    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
5653    MOTOR_TEST_ORDER_SEQUENCE = 1,
5654    #[doc = "Motor numbers are specified as the output as labeled on the board."]
5655    MOTOR_TEST_ORDER_BOARD = 2,
5656}
5657impl MotorTestOrder {
5658    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
5659}
5660impl Default for MotorTestOrder {
5661    fn default() -> Self {
5662        Self::DEFAULT
5663    }
5664}
5665#[cfg_attr(feature = "ts", derive(TS))]
5666#[cfg_attr(feature = "ts", ts(export))]
5667#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5668#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5669#[cfg_attr(feature = "serde", serde(tag = "type"))]
5670#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5671#[repr(u32)]
5672#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
5673pub enum MotorTestThrottleType {
5674    #[doc = "Throttle as a percentage (0 ~ 100)"]
5675    MOTOR_TEST_THROTTLE_PERCENT = 0,
5676    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
5677    MOTOR_TEST_THROTTLE_PWM = 1,
5678    #[doc = "Throttle pass-through from pilot's transmitter."]
5679    MOTOR_TEST_THROTTLE_PILOT = 2,
5680    #[doc = "Per-motor compass calibration test."]
5681    MOTOR_TEST_COMPASS_CAL = 3,
5682}
5683impl MotorTestThrottleType {
5684    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
5685}
5686impl Default for MotorTestThrottleType {
5687    fn default() -> Self {
5688        Self::DEFAULT
5689    }
5690}
5691#[cfg_attr(feature = "ts", derive(TS))]
5692#[cfg_attr(feature = "ts", ts(export))]
5693#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5694#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5695#[cfg_attr(feature = "serde", serde(tag = "type"))]
5696#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5697#[repr(u32)]
5698pub enum NavVtolLandOptions {
5699    #[doc = "Default autopilot landing behaviour."]
5700    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
5701    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
5702    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
5703    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
5704    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
5705}
5706impl NavVtolLandOptions {
5707    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
5708}
5709impl Default for NavVtolLandOptions {
5710    fn default() -> Self {
5711        Self::DEFAULT
5712    }
5713}
5714#[cfg_attr(feature = "ts", derive(TS))]
5715#[cfg_attr(feature = "ts", ts(export))]
5716#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5717#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5718#[cfg_attr(feature = "serde", serde(tag = "type"))]
5719#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5720#[repr(u32)]
5721#[doc = "Yaw behaviour during orbit flight."]
5722pub enum OrbitYawBehaviour {
5723    #[doc = "Vehicle front points to the center (default)."]
5724    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
5725    #[doc = "Vehicle front holds heading when message received."]
5726    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
5727    #[doc = "Yaw uncontrolled."]
5728    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
5729    #[doc = "Vehicle front follows flight path (tangential to circle)."]
5730    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
5731    #[doc = "Yaw controlled by RC input."]
5732    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
5733    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
5734    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
5735}
5736impl OrbitYawBehaviour {
5737    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
5738}
5739impl Default for OrbitYawBehaviour {
5740    fn default() -> Self {
5741        Self::DEFAULT
5742    }
5743}
5744#[cfg_attr(feature = "ts", derive(TS))]
5745#[cfg_attr(feature = "ts", ts(export))]
5746#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5747#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5748#[cfg_attr(feature = "serde", serde(tag = "type"))]
5749#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5750#[repr(u32)]
5751#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
5752pub enum ParachuteAction {
5753    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
5754    PARACHUTE_DISABLE = 0,
5755    #[doc = "Enable auto-release of parachute."]
5756    PARACHUTE_ENABLE = 1,
5757    #[doc = "Release parachute and kill motors."]
5758    PARACHUTE_RELEASE = 2,
5759}
5760impl ParachuteAction {
5761    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
5762}
5763impl Default for ParachuteAction {
5764    fn default() -> Self {
5765        Self::DEFAULT
5766    }
5767}
5768#[cfg_attr(feature = "ts", derive(TS))]
5769#[cfg_attr(feature = "ts", ts(export))]
5770#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5771#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5772#[cfg_attr(feature = "serde", serde(tag = "type"))]
5773#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5774#[repr(u32)]
5775#[doc = "Result from PARAM_EXT_SET message."]
5776pub enum ParamAck {
5777    #[doc = "Parameter value ACCEPTED and SET"]
5778    PARAM_ACK_ACCEPTED = 0,
5779    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
5780    PARAM_ACK_VALUE_UNSUPPORTED = 1,
5781    #[doc = "Parameter failed to set"]
5782    PARAM_ACK_FAILED = 2,
5783    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
5784    PARAM_ACK_IN_PROGRESS = 3,
5785}
5786impl ParamAck {
5787    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
5788}
5789impl Default for ParamAck {
5790    fn default() -> Self {
5791        Self::DEFAULT
5792    }
5793}
5794bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
5795impl PositionTargetTypemask {
5796    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
5797}
5798impl Default for PositionTargetTypemask {
5799    fn default() -> Self {
5800        Self::DEFAULT
5801    }
5802}
5803#[cfg_attr(feature = "ts", derive(TS))]
5804#[cfg_attr(feature = "ts", ts(export))]
5805#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5806#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5807#[cfg_attr(feature = "serde", serde(tag = "type"))]
5808#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5809#[repr(u32)]
5810#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
5811pub enum PrecisionLandMode {
5812    #[doc = "Normal (non-precision) landing."]
5813    PRECISION_LAND_MODE_DISABLED = 0,
5814    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
5815    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
5816    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
5817    PRECISION_LAND_MODE_REQUIRED = 2,
5818}
5819impl PrecisionLandMode {
5820    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
5821}
5822impl Default for PrecisionLandMode {
5823    fn default() -> Self {
5824        Self::DEFAULT
5825    }
5826}
5827#[cfg_attr(feature = "ts", derive(TS))]
5828#[cfg_attr(feature = "ts", ts(export))]
5829#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5830#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5831#[cfg_attr(feature = "serde", serde(tag = "type"))]
5832#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5833#[repr(u32)]
5834#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
5835pub enum PreflightStorageMissionAction {
5836    #[doc = "Read current mission data from persistent storage"]
5837    MISSION_READ_PERSISTENT = 0,
5838    #[doc = "Write current mission data to persistent storage"]
5839    MISSION_WRITE_PERSISTENT = 1,
5840    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
5841    MISSION_RESET_DEFAULT = 2,
5842}
5843impl PreflightStorageMissionAction {
5844    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
5845}
5846impl Default for PreflightStorageMissionAction {
5847    fn default() -> Self {
5848        Self::DEFAULT
5849    }
5850}
5851#[cfg_attr(feature = "ts", derive(TS))]
5852#[cfg_attr(feature = "ts", ts(export))]
5853#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5854#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5855#[cfg_attr(feature = "serde", serde(tag = "type"))]
5856#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5857#[repr(u32)]
5858#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
5859pub enum PreflightStorageParameterAction {
5860    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
5861    PARAM_READ_PERSISTENT = 0,
5862    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
5863    PARAM_WRITE_PERSISTENT = 1,
5864    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
5865    PARAM_RESET_CONFIG_DEFAULT = 2,
5866    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
5867    PARAM_RESET_SENSOR_DEFAULT = 3,
5868    #[doc = "Reset all parameters, including operation counters, to default values"]
5869    PARAM_RESET_ALL_DEFAULT = 4,
5870}
5871impl PreflightStorageParameterAction {
5872    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
5873}
5874impl Default for PreflightStorageParameterAction {
5875    fn default() -> Self {
5876        Self::DEFAULT
5877    }
5878}
5879#[cfg_attr(feature = "ts", derive(TS))]
5880#[cfg_attr(feature = "ts", ts(export))]
5881#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5882#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5883#[cfg_attr(feature = "serde", serde(tag = "type"))]
5884#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5885#[repr(u32)]
5886#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
5887pub enum RcSubType {
5888    #[doc = "Spektrum DSM2"]
5889    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
5890    #[doc = "Spektrum DSMX"]
5891    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
5892    #[doc = "Spektrum DSMX8"]
5893    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
5894}
5895impl RcSubType {
5896    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
5897}
5898impl Default for RcSubType {
5899    fn default() -> Self {
5900        Self::DEFAULT
5901    }
5902}
5903#[cfg_attr(feature = "ts", derive(TS))]
5904#[cfg_attr(feature = "ts", ts(export))]
5905#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5906#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5907#[cfg_attr(feature = "serde", serde(tag = "type"))]
5908#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5909#[repr(u32)]
5910#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
5911pub enum RcType {
5912    #[doc = "Spektrum"]
5913    RC_TYPE_SPEKTRUM = 0,
5914    #[doc = "CRSF"]
5915    RC_TYPE_CRSF = 1,
5916}
5917impl RcType {
5918    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
5919}
5920impl Default for RcType {
5921    fn default() -> Self {
5922        Self::DEFAULT
5923    }
5924}
5925#[cfg_attr(feature = "ts", derive(TS))]
5926#[cfg_attr(feature = "ts", ts(export))]
5927#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5928#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5929#[cfg_attr(feature = "serde", serde(tag = "type"))]
5930#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5931#[repr(u32)]
5932#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
5933pub enum RebootShutdownConditions {
5934    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
5935    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
5936    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
5937    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
5938}
5939impl RebootShutdownConditions {
5940    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
5941}
5942impl Default for RebootShutdownConditions {
5943    fn default() -> Self {
5944        Self::DEFAULT
5945    }
5946}
5947#[cfg_attr(feature = "ts", derive(TS))]
5948#[cfg_attr(feature = "ts", ts(export))]
5949#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5950#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5951#[cfg_attr(feature = "serde", serde(tag = "type"))]
5952#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5953#[repr(u32)]
5954#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
5955pub enum RtkBaselineCoordinateSystem {
5956    #[doc = "Earth-centered, Earth-fixed"]
5957    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
5958    #[doc = "RTK basestation centered, north, east, down"]
5959    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
5960}
5961impl RtkBaselineCoordinateSystem {
5962    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
5963}
5964impl Default for RtkBaselineCoordinateSystem {
5965    fn default() -> Self {
5966        Self::DEFAULT
5967    }
5968}
5969#[cfg_attr(feature = "ts", derive(TS))]
5970#[cfg_attr(feature = "ts", ts(export))]
5971#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5972#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5973#[cfg_attr(feature = "serde", serde(tag = "type"))]
5974#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5975#[repr(u32)]
5976#[doc = "Possible safety switch states."]
5977pub enum SafetySwitchState {
5978    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
5979    SAFETY_SWITCH_STATE_SAFE = 0,
5980    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
5981    SAFETY_SWITCH_STATE_DANGEROUS = 1,
5982}
5983impl SafetySwitchState {
5984    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
5985}
5986impl Default for SafetySwitchState {
5987    fn default() -> Self {
5988        Self::DEFAULT
5989    }
5990}
5991#[cfg_attr(feature = "ts", derive(TS))]
5992#[cfg_attr(feature = "ts", ts(export))]
5993#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
5994#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5995#[cfg_attr(feature = "serde", serde(tag = "type"))]
5996#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5997#[repr(u32)]
5998#[doc = "SERIAL_CONTROL device types"]
5999pub enum SerialControlDev {
6000    #[doc = "First telemetry port"]
6001    SERIAL_CONTROL_DEV_TELEM1 = 0,
6002    #[doc = "Second telemetry port"]
6003    SERIAL_CONTROL_DEV_TELEM2 = 1,
6004    #[doc = "First GPS port"]
6005    SERIAL_CONTROL_DEV_GPS1 = 2,
6006    #[doc = "Second GPS port"]
6007    SERIAL_CONTROL_DEV_GPS2 = 3,
6008    #[doc = "system shell"]
6009    SERIAL_CONTROL_DEV_SHELL = 10,
6010    #[doc = "SERIAL0"]
6011    SERIAL_CONTROL_SERIAL0 = 100,
6012    #[doc = "SERIAL1"]
6013    SERIAL_CONTROL_SERIAL1 = 101,
6014    #[doc = "SERIAL2"]
6015    SERIAL_CONTROL_SERIAL2 = 102,
6016    #[doc = "SERIAL3"]
6017    SERIAL_CONTROL_SERIAL3 = 103,
6018    #[doc = "SERIAL4"]
6019    SERIAL_CONTROL_SERIAL4 = 104,
6020    #[doc = "SERIAL5"]
6021    SERIAL_CONTROL_SERIAL5 = 105,
6022    #[doc = "SERIAL6"]
6023    SERIAL_CONTROL_SERIAL6 = 106,
6024    #[doc = "SERIAL7"]
6025    SERIAL_CONTROL_SERIAL7 = 107,
6026    #[doc = "SERIAL8"]
6027    SERIAL_CONTROL_SERIAL8 = 108,
6028    #[doc = "SERIAL9"]
6029    SERIAL_CONTROL_SERIAL9 = 109,
6030}
6031impl SerialControlDev {
6032    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
6033}
6034impl Default for SerialControlDev {
6035    fn default() -> Self {
6036        Self::DEFAULT
6037    }
6038}
6039bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
6040impl SerialControlFlag {
6041    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
6042}
6043impl Default for SerialControlFlag {
6044    fn default() -> Self {
6045        Self::DEFAULT
6046    }
6047}
6048#[cfg_attr(feature = "ts", derive(TS))]
6049#[cfg_attr(feature = "ts", ts(export))]
6050#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6051#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6052#[cfg_attr(feature = "serde", serde(tag = "type"))]
6053#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6054#[repr(u32)]
6055#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
6056pub enum SetFocusType {
6057    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
6058    FOCUS_TYPE_STEP = 0,
6059    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
6060    FOCUS_TYPE_CONTINUOUS = 1,
6061    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
6062    FOCUS_TYPE_RANGE = 2,
6063    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
6064    FOCUS_TYPE_METERS = 3,
6065    #[doc = "Focus automatically."]
6066    FOCUS_TYPE_AUTO = 4,
6067    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
6068    FOCUS_TYPE_AUTO_SINGLE = 5,
6069    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
6070    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
6071}
6072impl SetFocusType {
6073    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
6074}
6075impl Default for SetFocusType {
6076    fn default() -> Self {
6077        Self::DEFAULT
6078    }
6079}
6080#[cfg_attr(feature = "ts", derive(TS))]
6081#[cfg_attr(feature = "ts", ts(export))]
6082#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6083#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6084#[cfg_attr(feature = "serde", serde(tag = "type"))]
6085#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6086#[repr(u32)]
6087#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
6088pub enum SpeedType {
6089    #[doc = "Airspeed"]
6090    SPEED_TYPE_AIRSPEED = 0,
6091    #[doc = "Groundspeed"]
6092    SPEED_TYPE_GROUNDSPEED = 1,
6093    #[doc = "Climb speed"]
6094    SPEED_TYPE_CLIMB_SPEED = 2,
6095    #[doc = "Descent speed"]
6096    SPEED_TYPE_DESCENT_SPEED = 3,
6097}
6098impl SpeedType {
6099    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
6100}
6101impl Default for SpeedType {
6102    fn default() -> Self {
6103        Self::DEFAULT
6104    }
6105}
6106#[cfg_attr(feature = "ts", derive(TS))]
6107#[cfg_attr(feature = "ts", ts(export))]
6108#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6109#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6110#[cfg_attr(feature = "serde", serde(tag = "type"))]
6111#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6112#[repr(u32)]
6113#[doc = "Flags to indicate the status of camera storage."]
6114pub enum StorageStatus {
6115    #[doc = "Storage is missing (no microSD card loaded for example.)"]
6116    STORAGE_STATUS_EMPTY = 0,
6117    #[doc = "Storage present but unformatted."]
6118    STORAGE_STATUS_UNFORMATTED = 1,
6119    #[doc = "Storage present and ready."]
6120    STORAGE_STATUS_READY = 2,
6121    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
6122    STORAGE_STATUS_NOT_SUPPORTED = 3,
6123}
6124impl StorageStatus {
6125    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
6126}
6127impl Default for StorageStatus {
6128    fn default() -> Self {
6129        Self::DEFAULT
6130    }
6131}
6132#[cfg_attr(feature = "ts", derive(TS))]
6133#[cfg_attr(feature = "ts", ts(export))]
6134#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6135#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6136#[cfg_attr(feature = "serde", serde(tag = "type"))]
6137#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6138#[repr(u32)]
6139#[doc = "Flags to indicate the type of storage."]
6140pub enum StorageType {
6141    #[doc = "Storage type is not known."]
6142    STORAGE_TYPE_UNKNOWN = 0,
6143    #[doc = "Storage type is USB device."]
6144    STORAGE_TYPE_USB_STICK = 1,
6145    #[doc = "Storage type is SD card."]
6146    STORAGE_TYPE_SD = 2,
6147    #[doc = "Storage type is microSD card."]
6148    STORAGE_TYPE_MICROSD = 3,
6149    #[doc = "Storage type is CFast."]
6150    STORAGE_TYPE_CF = 4,
6151    #[doc = "Storage type is CFexpress."]
6152    STORAGE_TYPE_CFE = 5,
6153    #[doc = "Storage type is XQD."]
6154    STORAGE_TYPE_XQD = 6,
6155    #[doc = "Storage type is HD mass storage type."]
6156    STORAGE_TYPE_HD = 7,
6157    #[doc = "Storage type is other, not listed type."]
6158    STORAGE_TYPE_OTHER = 254,
6159}
6160impl StorageType {
6161    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
6162}
6163impl Default for StorageType {
6164    fn default() -> Self {
6165        Self::DEFAULT
6166    }
6167}
6168bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
6169impl StorageUsageFlag {
6170    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
6171}
6172impl Default for StorageUsageFlag {
6173    fn default() -> Self {
6174        Self::DEFAULT
6175    }
6176}
6177#[cfg_attr(feature = "ts", derive(TS))]
6178#[cfg_attr(feature = "ts", ts(export))]
6179#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6180#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6181#[cfg_attr(feature = "serde", serde(tag = "type"))]
6182#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6183#[repr(u32)]
6184#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
6185pub enum TuneFormat {
6186    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
6187    TUNE_FORMAT_QBASIC1_1 = 1,
6188    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
6189    TUNE_FORMAT_MML_MODERN = 2,
6190}
6191impl TuneFormat {
6192    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
6193}
6194impl Default for TuneFormat {
6195    fn default() -> Self {
6196        Self::DEFAULT
6197    }
6198}
6199#[cfg_attr(feature = "ts", derive(TS))]
6200#[cfg_attr(feature = "ts", ts(export))]
6201#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6202#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6203#[cfg_attr(feature = "serde", serde(tag = "type"))]
6204#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6205#[repr(u32)]
6206#[doc = "Generalized UAVCAN node health"]
6207pub enum UavcanNodeHealth {
6208    #[doc = "The node is functioning properly."]
6209    UAVCAN_NODE_HEALTH_OK = 0,
6210    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
6211    UAVCAN_NODE_HEALTH_WARNING = 1,
6212    #[doc = "The node has encountered a major failure."]
6213    UAVCAN_NODE_HEALTH_ERROR = 2,
6214    #[doc = "The node has suffered a fatal malfunction."]
6215    UAVCAN_NODE_HEALTH_CRITICAL = 3,
6216}
6217impl UavcanNodeHealth {
6218    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
6219}
6220impl Default for UavcanNodeHealth {
6221    fn default() -> Self {
6222        Self::DEFAULT
6223    }
6224}
6225#[cfg_attr(feature = "ts", derive(TS))]
6226#[cfg_attr(feature = "ts", ts(export))]
6227#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6228#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6229#[cfg_attr(feature = "serde", serde(tag = "type"))]
6230#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6231#[repr(u32)]
6232#[doc = "Generalized UAVCAN node mode"]
6233pub enum UavcanNodeMode {
6234    #[doc = "The node is performing its primary functions."]
6235    UAVCAN_NODE_MODE_OPERATIONAL = 0,
6236    #[doc = "The node is initializing; this mode is entered immediately after startup."]
6237    UAVCAN_NODE_MODE_INITIALIZATION = 1,
6238    #[doc = "The node is under maintenance."]
6239    UAVCAN_NODE_MODE_MAINTENANCE = 2,
6240    #[doc = "The node is in the process of updating its software."]
6241    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
6242    #[doc = "The node is no longer available online."]
6243    UAVCAN_NODE_MODE_OFFLINE = 7,
6244}
6245impl UavcanNodeMode {
6246    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
6247}
6248impl Default for UavcanNodeMode {
6249    fn default() -> Self {
6250        Self::DEFAULT
6251    }
6252}
6253bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
6254impl UtmDataAvailFlags {
6255    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
6256}
6257impl Default for UtmDataAvailFlags {
6258    fn default() -> Self {
6259        Self::DEFAULT
6260    }
6261}
6262#[cfg_attr(feature = "ts", derive(TS))]
6263#[cfg_attr(feature = "ts", ts(export))]
6264#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6265#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6266#[cfg_attr(feature = "serde", serde(tag = "type"))]
6267#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6268#[repr(u32)]
6269#[doc = "Airborne status of UAS."]
6270pub enum UtmFlightState {
6271    #[doc = "The flight state can't be determined."]
6272    UTM_FLIGHT_STATE_UNKNOWN = 1,
6273    #[doc = "UAS on ground."]
6274    UTM_FLIGHT_STATE_GROUND = 2,
6275    #[doc = "UAS airborne."]
6276    UTM_FLIGHT_STATE_AIRBORNE = 3,
6277    #[doc = "UAS is in an emergency flight state."]
6278    UTM_FLIGHT_STATE_EMERGENCY = 16,
6279    #[doc = "UAS has no active controls."]
6280    UTM_FLIGHT_STATE_NOCTRL = 32,
6281}
6282impl UtmFlightState {
6283    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
6284}
6285impl Default for UtmFlightState {
6286    fn default() -> Self {
6287        Self::DEFAULT
6288    }
6289}
6290#[cfg_attr(feature = "ts", derive(TS))]
6291#[cfg_attr(feature = "ts", ts(export))]
6292#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6293#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6294#[cfg_attr(feature = "serde", serde(tag = "type"))]
6295#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6296#[repr(u32)]
6297#[doc = "Video stream encodings"]
6298pub enum VideoStreamEncoding {
6299    #[doc = "Stream encoding is unknown"]
6300    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
6301    #[doc = "Stream encoding is H.264"]
6302    VIDEO_STREAM_ENCODING_H264 = 1,
6303    #[doc = "Stream encoding is H.265"]
6304    VIDEO_STREAM_ENCODING_H265 = 2,
6305}
6306impl VideoStreamEncoding {
6307    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
6308}
6309impl Default for VideoStreamEncoding {
6310    fn default() -> Self {
6311        Self::DEFAULT
6312    }
6313}
6314bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
6315impl VideoStreamStatusFlags {
6316    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
6317}
6318impl Default for VideoStreamStatusFlags {
6319    fn default() -> Self {
6320        Self::DEFAULT
6321    }
6322}
6323#[cfg_attr(feature = "ts", derive(TS))]
6324#[cfg_attr(feature = "ts", ts(export))]
6325#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6326#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6327#[cfg_attr(feature = "serde", serde(tag = "type"))]
6328#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6329#[repr(u32)]
6330#[doc = "Video stream types"]
6331pub enum VideoStreamType {
6332    #[doc = "Stream is RTSP"]
6333    VIDEO_STREAM_TYPE_RTSP = 0,
6334    #[doc = "Stream is RTP UDP (URI gives the port number)"]
6335    VIDEO_STREAM_TYPE_RTPUDP = 1,
6336    #[doc = "Stream is MPEG on TCP"]
6337    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
6338    #[doc = "Stream is MPEG TS (URI gives the port number)"]
6339    VIDEO_STREAM_TYPE_MPEG_TS = 3,
6340}
6341impl VideoStreamType {
6342    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
6343}
6344impl Default for VideoStreamType {
6345    fn default() -> Self {
6346        Self::DEFAULT
6347    }
6348}
6349#[cfg_attr(feature = "ts", derive(TS))]
6350#[cfg_attr(feature = "ts", ts(export))]
6351#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6352#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6353#[cfg_attr(feature = "serde", serde(tag = "type"))]
6354#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6355#[repr(u32)]
6356#[doc = "Direction of VTOL transition"]
6357pub enum VtolTransitionHeading {
6358    #[doc = "Respect the heading configuration of the vehicle."]
6359    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
6360    #[doc = "Use the heading pointing towards the next waypoint."]
6361    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
6362    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
6363    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
6364    #[doc = "Use the specified heading in parameter 4."]
6365    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
6366    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
6367    VTOL_TRANSITION_HEADING_ANY = 4,
6368}
6369impl VtolTransitionHeading {
6370    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
6371}
6372impl Default for VtolTransitionHeading {
6373    fn default() -> Self {
6374        Self::DEFAULT
6375    }
6376}
6377#[cfg_attr(feature = "ts", derive(TS))]
6378#[cfg_attr(feature = "ts", ts(export))]
6379#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6380#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6381#[cfg_attr(feature = "serde", serde(tag = "type"))]
6382#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6383#[repr(u32)]
6384#[doc = "WiFi Mode."]
6385pub enum WifiConfigApMode {
6386    #[doc = "WiFi mode is undefined."]
6387    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
6388    #[doc = "WiFi configured as an access point."]
6389    WIFI_CONFIG_AP_MODE_AP = 1,
6390    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
6391    WIFI_CONFIG_AP_MODE_STATION = 2,
6392    #[doc = "WiFi disabled."]
6393    WIFI_CONFIG_AP_MODE_DISABLED = 3,
6394}
6395impl WifiConfigApMode {
6396    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
6397}
6398impl Default for WifiConfigApMode {
6399    fn default() -> Self {
6400        Self::DEFAULT
6401    }
6402}
6403#[cfg_attr(feature = "ts", derive(TS))]
6404#[cfg_attr(feature = "ts", ts(export))]
6405#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6406#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6407#[cfg_attr(feature = "serde", serde(tag = "type"))]
6408#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6409#[repr(u32)]
6410#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
6411pub enum WifiConfigApResponse {
6412    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
6413    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
6414    #[doc = "Changes accepted."]
6415    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
6416    #[doc = "Changes rejected."]
6417    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
6418    #[doc = "Invalid Mode."]
6419    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
6420    #[doc = "Invalid SSID."]
6421    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
6422    #[doc = "Invalid Password."]
6423    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
6424}
6425impl WifiConfigApResponse {
6426    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
6427}
6428impl Default for WifiConfigApResponse {
6429    fn default() -> Self {
6430        Self::DEFAULT
6431    }
6432}
6433#[cfg_attr(feature = "ts", derive(TS))]
6434#[cfg_attr(feature = "ts", ts(export))]
6435#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
6436#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6437#[cfg_attr(feature = "serde", serde(tag = "type"))]
6438#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6439#[repr(u32)]
6440#[doc = "Winch actions."]
6441pub enum WinchActions {
6442    #[doc = "Allow motor to freewheel."]
6443    WINCH_RELAXED = 0,
6444    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
6445    WINCH_RELATIVE_LENGTH_CONTROL = 1,
6446    #[doc = "Wind or unwind line at specified rate."]
6447    WINCH_RATE_CONTROL = 2,
6448    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
6449    WINCH_LOCK = 3,
6450    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
6451    WINCH_DELIVER = 4,
6452    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
6453    WINCH_HOLD = 5,
6454    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
6455    WINCH_RETRACT = 6,
6456    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
6457    WINCH_LOAD_LINE = 7,
6458    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
6459    WINCH_ABANDON_LINE = 8,
6460    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
6461    WINCH_LOAD_PAYLOAD = 9,
6462}
6463impl WinchActions {
6464    pub const DEFAULT: Self = Self::WINCH_RELAXED;
6465}
6466impl Default for WinchActions {
6467    fn default() -> Self {
6468        Self::DEFAULT
6469    }
6470}
6471#[doc = "Set the vehicle attitude and body angular rates."]
6472#[doc = ""]
6473#[doc = "ID: 140"]
6474#[derive(Debug, Clone, PartialEq)]
6475#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6476#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6477#[cfg_attr(feature = "ts", derive(TS))]
6478#[cfg_attr(feature = "ts", ts(export))]
6479pub struct ACTUATOR_CONTROL_TARGET_DATA {
6480    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
6481    pub time_usec: u64,
6482    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
6483    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6484    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6485    pub controls: [f32; 8],
6486    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
6487    pub group_mlx: u8,
6488}
6489impl ACTUATOR_CONTROL_TARGET_DATA {
6490    pub const ENCODED_LEN: usize = 41usize;
6491    pub const DEFAULT: Self = Self {
6492        time_usec: 0_u64,
6493        controls: [0.0_f32; 8usize],
6494        group_mlx: 0_u8,
6495    };
6496    #[cfg(feature = "arbitrary")]
6497    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6498        use arbitrary::{Arbitrary, Unstructured};
6499        let mut buf = [0u8; 1024];
6500        rng.fill_bytes(&mut buf);
6501        let mut unstructured = Unstructured::new(&buf);
6502        Self::arbitrary(&mut unstructured).unwrap_or_default()
6503    }
6504}
6505impl Default for ACTUATOR_CONTROL_TARGET_DATA {
6506    fn default() -> Self {
6507        Self::DEFAULT.clone()
6508    }
6509}
6510impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
6511    type Message = MavMessage;
6512    const ID: u32 = 140u32;
6513    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
6514    const EXTRA_CRC: u8 = 181u8;
6515    const ENCODED_LEN: usize = 41usize;
6516    fn deser(
6517        _version: MavlinkVersion,
6518        __input: &[u8],
6519    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6520        let avail_len = __input.len();
6521        let mut payload_buf = [0; Self::ENCODED_LEN];
6522        let mut buf = if avail_len < Self::ENCODED_LEN {
6523            payload_buf[0..avail_len].copy_from_slice(__input);
6524            Bytes::new(&payload_buf)
6525        } else {
6526            Bytes::new(__input)
6527        };
6528        let mut __struct = Self::default();
6529        __struct.time_usec = buf.get_u64_le()?;
6530        for v in &mut __struct.controls {
6531            let val = buf.get_f32_le()?;
6532            *v = val;
6533        }
6534        __struct.group_mlx = buf.get_u8()?;
6535        Ok(__struct)
6536    }
6537    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6538        let mut __tmp = BytesMut::new(bytes);
6539        #[allow(clippy::absurd_extreme_comparisons)]
6540        #[allow(unused_comparisons)]
6541        if __tmp.remaining() < Self::ENCODED_LEN {
6542            panic!(
6543                "buffer is too small (need {} bytes, but got {})",
6544                Self::ENCODED_LEN,
6545                __tmp.remaining(),
6546            )
6547        }
6548        __tmp.put_u64_le(self.time_usec);
6549        for val in &self.controls {
6550            __tmp.put_f32_le(*val);
6551        }
6552        __tmp.put_u8(self.group_mlx);
6553        if matches!(version, MavlinkVersion::V2) {
6554            let len = __tmp.len();
6555            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6556        } else {
6557            __tmp.len()
6558        }
6559    }
6560}
6561#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
6562#[doc = ""]
6563#[doc = "ID: 375"]
6564#[derive(Debug, Clone, PartialEq)]
6565#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6566#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6567#[cfg_attr(feature = "ts", derive(TS))]
6568#[cfg_attr(feature = "ts", ts(export))]
6569pub struct ACTUATOR_OUTPUT_STATUS_DATA {
6570    #[doc = "Timestamp (since system boot)."]
6571    pub time_usec: u64,
6572    #[doc = "Active outputs"]
6573    pub active: u32,
6574    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
6575    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6576    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6577    pub actuator: [f32; 32],
6578}
6579impl ACTUATOR_OUTPUT_STATUS_DATA {
6580    pub const ENCODED_LEN: usize = 140usize;
6581    pub const DEFAULT: Self = Self {
6582        time_usec: 0_u64,
6583        active: 0_u32,
6584        actuator: [0.0_f32; 32usize],
6585    };
6586    #[cfg(feature = "arbitrary")]
6587    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6588        use arbitrary::{Arbitrary, Unstructured};
6589        let mut buf = [0u8; 1024];
6590        rng.fill_bytes(&mut buf);
6591        let mut unstructured = Unstructured::new(&buf);
6592        Self::arbitrary(&mut unstructured).unwrap_or_default()
6593    }
6594}
6595impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
6596    fn default() -> Self {
6597        Self::DEFAULT.clone()
6598    }
6599}
6600impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
6601    type Message = MavMessage;
6602    const ID: u32 = 375u32;
6603    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
6604    const EXTRA_CRC: u8 = 251u8;
6605    const ENCODED_LEN: usize = 140usize;
6606    fn deser(
6607        _version: MavlinkVersion,
6608        __input: &[u8],
6609    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6610        let avail_len = __input.len();
6611        let mut payload_buf = [0; Self::ENCODED_LEN];
6612        let mut buf = if avail_len < Self::ENCODED_LEN {
6613            payload_buf[0..avail_len].copy_from_slice(__input);
6614            Bytes::new(&payload_buf)
6615        } else {
6616            Bytes::new(__input)
6617        };
6618        let mut __struct = Self::default();
6619        __struct.time_usec = buf.get_u64_le()?;
6620        __struct.active = buf.get_u32_le()?;
6621        for v in &mut __struct.actuator {
6622            let val = buf.get_f32_le()?;
6623            *v = val;
6624        }
6625        Ok(__struct)
6626    }
6627    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6628        let mut __tmp = BytesMut::new(bytes);
6629        #[allow(clippy::absurd_extreme_comparisons)]
6630        #[allow(unused_comparisons)]
6631        if __tmp.remaining() < Self::ENCODED_LEN {
6632            panic!(
6633                "buffer is too small (need {} bytes, but got {})",
6634                Self::ENCODED_LEN,
6635                __tmp.remaining(),
6636            )
6637        }
6638        __tmp.put_u64_le(self.time_usec);
6639        __tmp.put_u32_le(self.active);
6640        for val in &self.actuator {
6641            __tmp.put_f32_le(*val);
6642        }
6643        if matches!(version, MavlinkVersion::V2) {
6644            let len = __tmp.len();
6645            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6646        } else {
6647            __tmp.len()
6648        }
6649    }
6650}
6651#[doc = "The location and information of an ADSB vehicle."]
6652#[doc = ""]
6653#[doc = "ID: 246"]
6654#[derive(Debug, Clone, PartialEq)]
6655#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6656#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6657#[cfg_attr(feature = "ts", derive(TS))]
6658#[cfg_attr(feature = "ts", ts(export))]
6659pub struct ADSB_VEHICLE_DATA {
6660    #[doc = "ICAO address"]
6661    pub ICAO_address: u32,
6662    #[doc = "Latitude"]
6663    pub lat: i32,
6664    #[doc = "Longitude"]
6665    pub lon: i32,
6666    #[doc = "Altitude(ASL)"]
6667    pub altitude: i32,
6668    #[doc = "Course over ground"]
6669    pub heading: u16,
6670    #[doc = "The horizontal velocity"]
6671    pub hor_velocity: u16,
6672    #[doc = "The vertical velocity. Positive is up"]
6673    pub ver_velocity: i16,
6674    #[doc = "Bitmap to indicate various statuses including valid data fields"]
6675    pub flags: AdsbFlags,
6676    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
6677    pub squawk: u16,
6678    #[doc = "ADSB altitude type."]
6679    pub altitude_type: AdsbAltitudeType,
6680    #[doc = "The callsign, 8+null"]
6681    #[cfg_attr(feature = "ts", ts(type = "string"))]
6682    pub callsign: CharArray<9>,
6683    #[doc = "ADSB emitter type."]
6684    pub emitter_type: AdsbEmitterType,
6685    #[doc = "Time since last communication in seconds"]
6686    pub tslc: u8,
6687}
6688impl ADSB_VEHICLE_DATA {
6689    pub const ENCODED_LEN: usize = 38usize;
6690    pub const DEFAULT: Self = Self {
6691        ICAO_address: 0_u32,
6692        lat: 0_i32,
6693        lon: 0_i32,
6694        altitude: 0_i32,
6695        heading: 0_u16,
6696        hor_velocity: 0_u16,
6697        ver_velocity: 0_i16,
6698        flags: AdsbFlags::DEFAULT,
6699        squawk: 0_u16,
6700        altitude_type: AdsbAltitudeType::DEFAULT,
6701        callsign: CharArray::new([0_u8; 9usize]),
6702        emitter_type: AdsbEmitterType::DEFAULT,
6703        tslc: 0_u8,
6704    };
6705    #[cfg(feature = "arbitrary")]
6706    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6707        use arbitrary::{Arbitrary, Unstructured};
6708        let mut buf = [0u8; 1024];
6709        rng.fill_bytes(&mut buf);
6710        let mut unstructured = Unstructured::new(&buf);
6711        Self::arbitrary(&mut unstructured).unwrap_or_default()
6712    }
6713}
6714impl Default for ADSB_VEHICLE_DATA {
6715    fn default() -> Self {
6716        Self::DEFAULT.clone()
6717    }
6718}
6719impl MessageData for ADSB_VEHICLE_DATA {
6720    type Message = MavMessage;
6721    const ID: u32 = 246u32;
6722    const NAME: &'static str = "ADSB_VEHICLE";
6723    const EXTRA_CRC: u8 = 184u8;
6724    const ENCODED_LEN: usize = 38usize;
6725    fn deser(
6726        _version: MavlinkVersion,
6727        __input: &[u8],
6728    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6729        let avail_len = __input.len();
6730        let mut payload_buf = [0; Self::ENCODED_LEN];
6731        let mut buf = if avail_len < Self::ENCODED_LEN {
6732            payload_buf[0..avail_len].copy_from_slice(__input);
6733            Bytes::new(&payload_buf)
6734        } else {
6735            Bytes::new(__input)
6736        };
6737        let mut __struct = Self::default();
6738        __struct.ICAO_address = buf.get_u32_le()?;
6739        __struct.lat = buf.get_i32_le()?;
6740        __struct.lon = buf.get_i32_le()?;
6741        __struct.altitude = buf.get_i32_le()?;
6742        __struct.heading = buf.get_u16_le()?;
6743        __struct.hor_velocity = buf.get_u16_le()?;
6744        __struct.ver_velocity = buf.get_i16_le()?;
6745        let tmp = buf.get_u16_le()?;
6746        __struct.flags = AdsbFlags::from_bits(tmp as <AdsbFlags as Flags>::Bits).ok_or(
6747            ::mavlink_core::error::ParserError::InvalidFlag {
6748                flag_type: "AdsbFlags",
6749                value: tmp as u64,
6750            },
6751        )?;
6752        __struct.squawk = buf.get_u16_le()?;
6753        let tmp = buf.get_u8()?;
6754        __struct.altitude_type =
6755            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6756                enum_type: "AdsbAltitudeType",
6757                value: tmp as u64,
6758            })?;
6759        let mut tmp = [0_u8; 9usize];
6760        for v in &mut tmp {
6761            *v = buf.get_u8()?;
6762        }
6763        __struct.callsign = CharArray::new(tmp);
6764        let tmp = buf.get_u8()?;
6765        __struct.emitter_type =
6766            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6767                enum_type: "AdsbEmitterType",
6768                value: tmp as u64,
6769            })?;
6770        __struct.tslc = buf.get_u8()?;
6771        Ok(__struct)
6772    }
6773    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6774        let mut __tmp = BytesMut::new(bytes);
6775        #[allow(clippy::absurd_extreme_comparisons)]
6776        #[allow(unused_comparisons)]
6777        if __tmp.remaining() < Self::ENCODED_LEN {
6778            panic!(
6779                "buffer is too small (need {} bytes, but got {})",
6780                Self::ENCODED_LEN,
6781                __tmp.remaining(),
6782            )
6783        }
6784        __tmp.put_u32_le(self.ICAO_address);
6785        __tmp.put_i32_le(self.lat);
6786        __tmp.put_i32_le(self.lon);
6787        __tmp.put_i32_le(self.altitude);
6788        __tmp.put_u16_le(self.heading);
6789        __tmp.put_u16_le(self.hor_velocity);
6790        __tmp.put_i16_le(self.ver_velocity);
6791        __tmp.put_u16_le(self.flags.bits() as u16);
6792        __tmp.put_u16_le(self.squawk);
6793        __tmp.put_u8(self.altitude_type as u8);
6794        for val in &self.callsign {
6795            __tmp.put_u8(*val);
6796        }
6797        __tmp.put_u8(self.emitter_type as u8);
6798        __tmp.put_u8(self.tslc);
6799        if matches!(version, MavlinkVersion::V2) {
6800            let len = __tmp.len();
6801            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6802        } else {
6803            __tmp.len()
6804        }
6805    }
6806}
6807#[doc = "The location and information of an AIS vessel."]
6808#[doc = ""]
6809#[doc = "ID: 301"]
6810#[derive(Debug, Clone, PartialEq)]
6811#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6812#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6813#[cfg_attr(feature = "ts", derive(TS))]
6814#[cfg_attr(feature = "ts", ts(export))]
6815pub struct AIS_VESSEL_DATA {
6816    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
6817    pub MMSI: u32,
6818    #[doc = "Latitude"]
6819    pub lat: i32,
6820    #[doc = "Longitude"]
6821    pub lon: i32,
6822    #[doc = "Course over ground"]
6823    pub COG: u16,
6824    #[doc = "True heading"]
6825    pub heading: u16,
6826    #[doc = "Speed over ground"]
6827    pub velocity: u16,
6828    #[doc = "Distance from lat/lon location to bow"]
6829    pub dimension_bow: u16,
6830    #[doc = "Distance from lat/lon location to stern"]
6831    pub dimension_stern: u16,
6832    #[doc = "Time since last communication in seconds"]
6833    pub tslc: u16,
6834    #[doc = "Bitmask to indicate various statuses including valid data fields"]
6835    pub flags: AisFlags,
6836    #[doc = "Turn rate"]
6837    pub turn_rate: i8,
6838    #[doc = "Navigational status"]
6839    pub navigational_status: AisNavStatus,
6840    #[doc = "Type of vessels"]
6841    pub mavtype: AisType,
6842    #[doc = "Distance from lat/lon location to port side"]
6843    pub dimension_port: u8,
6844    #[doc = "Distance from lat/lon location to starboard side"]
6845    pub dimension_starboard: u8,
6846    #[doc = "The vessel callsign"]
6847    #[cfg_attr(feature = "ts", ts(type = "string"))]
6848    pub callsign: CharArray<7>,
6849    #[doc = "The vessel name"]
6850    #[cfg_attr(feature = "ts", ts(type = "string"))]
6851    pub name: CharArray<20>,
6852}
6853impl AIS_VESSEL_DATA {
6854    pub const ENCODED_LEN: usize = 58usize;
6855    pub const DEFAULT: Self = Self {
6856        MMSI: 0_u32,
6857        lat: 0_i32,
6858        lon: 0_i32,
6859        COG: 0_u16,
6860        heading: 0_u16,
6861        velocity: 0_u16,
6862        dimension_bow: 0_u16,
6863        dimension_stern: 0_u16,
6864        tslc: 0_u16,
6865        flags: AisFlags::DEFAULT,
6866        turn_rate: 0_i8,
6867        navigational_status: AisNavStatus::DEFAULT,
6868        mavtype: AisType::DEFAULT,
6869        dimension_port: 0_u8,
6870        dimension_starboard: 0_u8,
6871        callsign: CharArray::new([0_u8; 7usize]),
6872        name: CharArray::new([0_u8; 20usize]),
6873    };
6874    #[cfg(feature = "arbitrary")]
6875    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6876        use arbitrary::{Arbitrary, Unstructured};
6877        let mut buf = [0u8; 1024];
6878        rng.fill_bytes(&mut buf);
6879        let mut unstructured = Unstructured::new(&buf);
6880        Self::arbitrary(&mut unstructured).unwrap_or_default()
6881    }
6882}
6883impl Default for AIS_VESSEL_DATA {
6884    fn default() -> Self {
6885        Self::DEFAULT.clone()
6886    }
6887}
6888impl MessageData for AIS_VESSEL_DATA {
6889    type Message = MavMessage;
6890    const ID: u32 = 301u32;
6891    const NAME: &'static str = "AIS_VESSEL";
6892    const EXTRA_CRC: u8 = 243u8;
6893    const ENCODED_LEN: usize = 58usize;
6894    fn deser(
6895        _version: MavlinkVersion,
6896        __input: &[u8],
6897    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6898        let avail_len = __input.len();
6899        let mut payload_buf = [0; Self::ENCODED_LEN];
6900        let mut buf = if avail_len < Self::ENCODED_LEN {
6901            payload_buf[0..avail_len].copy_from_slice(__input);
6902            Bytes::new(&payload_buf)
6903        } else {
6904            Bytes::new(__input)
6905        };
6906        let mut __struct = Self::default();
6907        __struct.MMSI = buf.get_u32_le()?;
6908        __struct.lat = buf.get_i32_le()?;
6909        __struct.lon = buf.get_i32_le()?;
6910        __struct.COG = buf.get_u16_le()?;
6911        __struct.heading = buf.get_u16_le()?;
6912        __struct.velocity = buf.get_u16_le()?;
6913        __struct.dimension_bow = buf.get_u16_le()?;
6914        __struct.dimension_stern = buf.get_u16_le()?;
6915        __struct.tslc = buf.get_u16_le()?;
6916        let tmp = buf.get_u16_le()?;
6917        __struct.flags = AisFlags::from_bits(tmp as <AisFlags as Flags>::Bits).ok_or(
6918            ::mavlink_core::error::ParserError::InvalidFlag {
6919                flag_type: "AisFlags",
6920                value: tmp as u64,
6921            },
6922        )?;
6923        __struct.turn_rate = buf.get_i8()?;
6924        let tmp = buf.get_u8()?;
6925        __struct.navigational_status =
6926            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6927                enum_type: "AisNavStatus",
6928                value: tmp as u64,
6929            })?;
6930        let tmp = buf.get_u8()?;
6931        __struct.mavtype =
6932            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6933                enum_type: "AisType",
6934                value: tmp as u64,
6935            })?;
6936        __struct.dimension_port = buf.get_u8()?;
6937        __struct.dimension_starboard = buf.get_u8()?;
6938        let mut tmp = [0_u8; 7usize];
6939        for v in &mut tmp {
6940            *v = buf.get_u8()?;
6941        }
6942        __struct.callsign = CharArray::new(tmp);
6943        let mut tmp = [0_u8; 20usize];
6944        for v in &mut tmp {
6945            *v = buf.get_u8()?;
6946        }
6947        __struct.name = CharArray::new(tmp);
6948        Ok(__struct)
6949    }
6950    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6951        let mut __tmp = BytesMut::new(bytes);
6952        #[allow(clippy::absurd_extreme_comparisons)]
6953        #[allow(unused_comparisons)]
6954        if __tmp.remaining() < Self::ENCODED_LEN {
6955            panic!(
6956                "buffer is too small (need {} bytes, but got {})",
6957                Self::ENCODED_LEN,
6958                __tmp.remaining(),
6959            )
6960        }
6961        __tmp.put_u32_le(self.MMSI);
6962        __tmp.put_i32_le(self.lat);
6963        __tmp.put_i32_le(self.lon);
6964        __tmp.put_u16_le(self.COG);
6965        __tmp.put_u16_le(self.heading);
6966        __tmp.put_u16_le(self.velocity);
6967        __tmp.put_u16_le(self.dimension_bow);
6968        __tmp.put_u16_le(self.dimension_stern);
6969        __tmp.put_u16_le(self.tslc);
6970        __tmp.put_u16_le(self.flags.bits() as u16);
6971        __tmp.put_i8(self.turn_rate);
6972        __tmp.put_u8(self.navigational_status as u8);
6973        __tmp.put_u8(self.mavtype as u8);
6974        __tmp.put_u8(self.dimension_port);
6975        __tmp.put_u8(self.dimension_starboard);
6976        for val in &self.callsign {
6977            __tmp.put_u8(*val);
6978        }
6979        for val in &self.name {
6980            __tmp.put_u8(*val);
6981        }
6982        if matches!(version, MavlinkVersion::V2) {
6983            let len = __tmp.len();
6984            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6985        } else {
6986            __tmp.len()
6987        }
6988    }
6989}
6990#[doc = "The current system altitude."]
6991#[doc = ""]
6992#[doc = "ID: 141"]
6993#[derive(Debug, Clone, PartialEq)]
6994#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6995#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6996#[cfg_attr(feature = "ts", derive(TS))]
6997#[cfg_attr(feature = "ts", ts(export))]
6998pub struct ALTITUDE_DATA {
6999    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
7000    pub time_usec: u64,
7001    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
7002    pub altitude_monotonic: f32,
7003    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
7004    pub altitude_amsl: f32,
7005    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
7006    pub altitude_local: f32,
7007    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
7008    pub altitude_relative: f32,
7009    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
7010    pub altitude_terrain: f32,
7011    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
7012    pub bottom_clearance: f32,
7013}
7014impl ALTITUDE_DATA {
7015    pub const ENCODED_LEN: usize = 32usize;
7016    pub const DEFAULT: Self = Self {
7017        time_usec: 0_u64,
7018        altitude_monotonic: 0.0_f32,
7019        altitude_amsl: 0.0_f32,
7020        altitude_local: 0.0_f32,
7021        altitude_relative: 0.0_f32,
7022        altitude_terrain: 0.0_f32,
7023        bottom_clearance: 0.0_f32,
7024    };
7025    #[cfg(feature = "arbitrary")]
7026    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7027        use arbitrary::{Arbitrary, Unstructured};
7028        let mut buf = [0u8; 1024];
7029        rng.fill_bytes(&mut buf);
7030        let mut unstructured = Unstructured::new(&buf);
7031        Self::arbitrary(&mut unstructured).unwrap_or_default()
7032    }
7033}
7034impl Default for ALTITUDE_DATA {
7035    fn default() -> Self {
7036        Self::DEFAULT.clone()
7037    }
7038}
7039impl MessageData for ALTITUDE_DATA {
7040    type Message = MavMessage;
7041    const ID: u32 = 141u32;
7042    const NAME: &'static str = "ALTITUDE";
7043    const EXTRA_CRC: u8 = 47u8;
7044    const ENCODED_LEN: usize = 32usize;
7045    fn deser(
7046        _version: MavlinkVersion,
7047        __input: &[u8],
7048    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7049        let avail_len = __input.len();
7050        let mut payload_buf = [0; Self::ENCODED_LEN];
7051        let mut buf = if avail_len < Self::ENCODED_LEN {
7052            payload_buf[0..avail_len].copy_from_slice(__input);
7053            Bytes::new(&payload_buf)
7054        } else {
7055            Bytes::new(__input)
7056        };
7057        let mut __struct = Self::default();
7058        __struct.time_usec = buf.get_u64_le()?;
7059        __struct.altitude_monotonic = buf.get_f32_le()?;
7060        __struct.altitude_amsl = buf.get_f32_le()?;
7061        __struct.altitude_local = buf.get_f32_le()?;
7062        __struct.altitude_relative = buf.get_f32_le()?;
7063        __struct.altitude_terrain = buf.get_f32_le()?;
7064        __struct.bottom_clearance = buf.get_f32_le()?;
7065        Ok(__struct)
7066    }
7067    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7068        let mut __tmp = BytesMut::new(bytes);
7069        #[allow(clippy::absurd_extreme_comparisons)]
7070        #[allow(unused_comparisons)]
7071        if __tmp.remaining() < Self::ENCODED_LEN {
7072            panic!(
7073                "buffer is too small (need {} bytes, but got {})",
7074                Self::ENCODED_LEN,
7075                __tmp.remaining(),
7076            )
7077        }
7078        __tmp.put_u64_le(self.time_usec);
7079        __tmp.put_f32_le(self.altitude_monotonic);
7080        __tmp.put_f32_le(self.altitude_amsl);
7081        __tmp.put_f32_le(self.altitude_local);
7082        __tmp.put_f32_le(self.altitude_relative);
7083        __tmp.put_f32_le(self.altitude_terrain);
7084        __tmp.put_f32_le(self.bottom_clearance);
7085        if matches!(version, MavlinkVersion::V2) {
7086            let len = __tmp.len();
7087            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7088        } else {
7089            __tmp.len()
7090        }
7091    }
7092}
7093#[doc = "Array test #0."]
7094#[doc = ""]
7095#[doc = "ID: 17150"]
7096#[derive(Debug, Clone, PartialEq)]
7097#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7098#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7099#[cfg_attr(feature = "ts", derive(TS))]
7100#[cfg_attr(feature = "ts", ts(export))]
7101pub struct ARRAY_TEST_0_DATA {
7102    #[doc = "Value array"]
7103    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7104    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7105    pub ar_u32: [u32; 4],
7106    #[doc = "Value array"]
7107    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7108    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7109    pub ar_u16: [u16; 4],
7110    #[doc = "Stub field"]
7111    pub v1: u8,
7112    #[doc = "Value array"]
7113    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7114    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7115    pub ar_i8: [i8; 4],
7116    #[doc = "Value array"]
7117    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7118    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7119    pub ar_u8: [u8; 4],
7120}
7121impl ARRAY_TEST_0_DATA {
7122    pub const ENCODED_LEN: usize = 33usize;
7123    pub const DEFAULT: Self = Self {
7124        ar_u32: [0_u32; 4usize],
7125        ar_u16: [0_u16; 4usize],
7126        v1: 0_u8,
7127        ar_i8: [0_i8; 4usize],
7128        ar_u8: [0_u8; 4usize],
7129    };
7130    #[cfg(feature = "arbitrary")]
7131    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7132        use arbitrary::{Arbitrary, Unstructured};
7133        let mut buf = [0u8; 1024];
7134        rng.fill_bytes(&mut buf);
7135        let mut unstructured = Unstructured::new(&buf);
7136        Self::arbitrary(&mut unstructured).unwrap_or_default()
7137    }
7138}
7139impl Default for ARRAY_TEST_0_DATA {
7140    fn default() -> Self {
7141        Self::DEFAULT.clone()
7142    }
7143}
7144impl MessageData for ARRAY_TEST_0_DATA {
7145    type Message = MavMessage;
7146    const ID: u32 = 17150u32;
7147    const NAME: &'static str = "ARRAY_TEST_0";
7148    const EXTRA_CRC: u8 = 26u8;
7149    const ENCODED_LEN: usize = 33usize;
7150    fn deser(
7151        _version: MavlinkVersion,
7152        __input: &[u8],
7153    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7154        let avail_len = __input.len();
7155        let mut payload_buf = [0; Self::ENCODED_LEN];
7156        let mut buf = if avail_len < Self::ENCODED_LEN {
7157            payload_buf[0..avail_len].copy_from_slice(__input);
7158            Bytes::new(&payload_buf)
7159        } else {
7160            Bytes::new(__input)
7161        };
7162        let mut __struct = Self::default();
7163        for v in &mut __struct.ar_u32 {
7164            let val = buf.get_u32_le()?;
7165            *v = val;
7166        }
7167        for v in &mut __struct.ar_u16 {
7168            let val = buf.get_u16_le()?;
7169            *v = val;
7170        }
7171        __struct.v1 = buf.get_u8()?;
7172        for v in &mut __struct.ar_i8 {
7173            let val = buf.get_i8()?;
7174            *v = val;
7175        }
7176        for v in &mut __struct.ar_u8 {
7177            let val = buf.get_u8()?;
7178            *v = val;
7179        }
7180        Ok(__struct)
7181    }
7182    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7183        let mut __tmp = BytesMut::new(bytes);
7184        #[allow(clippy::absurd_extreme_comparisons)]
7185        #[allow(unused_comparisons)]
7186        if __tmp.remaining() < Self::ENCODED_LEN {
7187            panic!(
7188                "buffer is too small (need {} bytes, but got {})",
7189                Self::ENCODED_LEN,
7190                __tmp.remaining(),
7191            )
7192        }
7193        for val in &self.ar_u32 {
7194            __tmp.put_u32_le(*val);
7195        }
7196        for val in &self.ar_u16 {
7197            __tmp.put_u16_le(*val);
7198        }
7199        __tmp.put_u8(self.v1);
7200        for val in &self.ar_i8 {
7201            __tmp.put_i8(*val);
7202        }
7203        for val in &self.ar_u8 {
7204            __tmp.put_u8(*val);
7205        }
7206        if matches!(version, MavlinkVersion::V2) {
7207            let len = __tmp.len();
7208            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7209        } else {
7210            __tmp.len()
7211        }
7212    }
7213}
7214#[doc = "Array test #1."]
7215#[doc = ""]
7216#[doc = "ID: 17151"]
7217#[derive(Debug, Clone, PartialEq)]
7218#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7219#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7220#[cfg_attr(feature = "ts", derive(TS))]
7221#[cfg_attr(feature = "ts", ts(export))]
7222pub struct ARRAY_TEST_1_DATA {
7223    #[doc = "Value array"]
7224    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7225    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7226    pub ar_u32: [u32; 4],
7227}
7228impl ARRAY_TEST_1_DATA {
7229    pub const ENCODED_LEN: usize = 16usize;
7230    pub const DEFAULT: Self = Self {
7231        ar_u32: [0_u32; 4usize],
7232    };
7233    #[cfg(feature = "arbitrary")]
7234    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7235        use arbitrary::{Arbitrary, Unstructured};
7236        let mut buf = [0u8; 1024];
7237        rng.fill_bytes(&mut buf);
7238        let mut unstructured = Unstructured::new(&buf);
7239        Self::arbitrary(&mut unstructured).unwrap_or_default()
7240    }
7241}
7242impl Default for ARRAY_TEST_1_DATA {
7243    fn default() -> Self {
7244        Self::DEFAULT.clone()
7245    }
7246}
7247impl MessageData for ARRAY_TEST_1_DATA {
7248    type Message = MavMessage;
7249    const ID: u32 = 17151u32;
7250    const NAME: &'static str = "ARRAY_TEST_1";
7251    const EXTRA_CRC: u8 = 72u8;
7252    const ENCODED_LEN: usize = 16usize;
7253    fn deser(
7254        _version: MavlinkVersion,
7255        __input: &[u8],
7256    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7257        let avail_len = __input.len();
7258        let mut payload_buf = [0; Self::ENCODED_LEN];
7259        let mut buf = if avail_len < Self::ENCODED_LEN {
7260            payload_buf[0..avail_len].copy_from_slice(__input);
7261            Bytes::new(&payload_buf)
7262        } else {
7263            Bytes::new(__input)
7264        };
7265        let mut __struct = Self::default();
7266        for v in &mut __struct.ar_u32 {
7267            let val = buf.get_u32_le()?;
7268            *v = val;
7269        }
7270        Ok(__struct)
7271    }
7272    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7273        let mut __tmp = BytesMut::new(bytes);
7274        #[allow(clippy::absurd_extreme_comparisons)]
7275        #[allow(unused_comparisons)]
7276        if __tmp.remaining() < Self::ENCODED_LEN {
7277            panic!(
7278                "buffer is too small (need {} bytes, but got {})",
7279                Self::ENCODED_LEN,
7280                __tmp.remaining(),
7281            )
7282        }
7283        for val in &self.ar_u32 {
7284            __tmp.put_u32_le(*val);
7285        }
7286        if matches!(version, MavlinkVersion::V2) {
7287            let len = __tmp.len();
7288            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7289        } else {
7290            __tmp.len()
7291        }
7292    }
7293}
7294#[doc = "Array test #3."]
7295#[doc = ""]
7296#[doc = "ID: 17153"]
7297#[derive(Debug, Clone, PartialEq)]
7298#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7299#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7300#[cfg_attr(feature = "ts", derive(TS))]
7301#[cfg_attr(feature = "ts", ts(export))]
7302pub struct ARRAY_TEST_3_DATA {
7303    #[doc = "Value array"]
7304    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7305    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7306    pub ar_u32: [u32; 4],
7307    #[doc = "Stub field"]
7308    pub v: u8,
7309}
7310impl ARRAY_TEST_3_DATA {
7311    pub const ENCODED_LEN: usize = 17usize;
7312    pub const DEFAULT: Self = Self {
7313        ar_u32: [0_u32; 4usize],
7314        v: 0_u8,
7315    };
7316    #[cfg(feature = "arbitrary")]
7317    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7318        use arbitrary::{Arbitrary, Unstructured};
7319        let mut buf = [0u8; 1024];
7320        rng.fill_bytes(&mut buf);
7321        let mut unstructured = Unstructured::new(&buf);
7322        Self::arbitrary(&mut unstructured).unwrap_or_default()
7323    }
7324}
7325impl Default for ARRAY_TEST_3_DATA {
7326    fn default() -> Self {
7327        Self::DEFAULT.clone()
7328    }
7329}
7330impl MessageData for ARRAY_TEST_3_DATA {
7331    type Message = MavMessage;
7332    const ID: u32 = 17153u32;
7333    const NAME: &'static str = "ARRAY_TEST_3";
7334    const EXTRA_CRC: u8 = 19u8;
7335    const ENCODED_LEN: usize = 17usize;
7336    fn deser(
7337        _version: MavlinkVersion,
7338        __input: &[u8],
7339    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7340        let avail_len = __input.len();
7341        let mut payload_buf = [0; Self::ENCODED_LEN];
7342        let mut buf = if avail_len < Self::ENCODED_LEN {
7343            payload_buf[0..avail_len].copy_from_slice(__input);
7344            Bytes::new(&payload_buf)
7345        } else {
7346            Bytes::new(__input)
7347        };
7348        let mut __struct = Self::default();
7349        for v in &mut __struct.ar_u32 {
7350            let val = buf.get_u32_le()?;
7351            *v = val;
7352        }
7353        __struct.v = buf.get_u8()?;
7354        Ok(__struct)
7355    }
7356    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7357        let mut __tmp = BytesMut::new(bytes);
7358        #[allow(clippy::absurd_extreme_comparisons)]
7359        #[allow(unused_comparisons)]
7360        if __tmp.remaining() < Self::ENCODED_LEN {
7361            panic!(
7362                "buffer is too small (need {} bytes, but got {})",
7363                Self::ENCODED_LEN,
7364                __tmp.remaining(),
7365            )
7366        }
7367        for val in &self.ar_u32 {
7368            __tmp.put_u32_le(*val);
7369        }
7370        __tmp.put_u8(self.v);
7371        if matches!(version, MavlinkVersion::V2) {
7372            let len = __tmp.len();
7373            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7374        } else {
7375            __tmp.len()
7376        }
7377    }
7378}
7379#[doc = "Array test #4."]
7380#[doc = ""]
7381#[doc = "ID: 17154"]
7382#[derive(Debug, Clone, PartialEq)]
7383#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7384#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7385#[cfg_attr(feature = "ts", derive(TS))]
7386#[cfg_attr(feature = "ts", ts(export))]
7387pub struct ARRAY_TEST_4_DATA {
7388    #[doc = "Value array"]
7389    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7390    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7391    pub ar_u32: [u32; 4],
7392    #[doc = "Stub field"]
7393    pub v: u8,
7394}
7395impl ARRAY_TEST_4_DATA {
7396    pub const ENCODED_LEN: usize = 17usize;
7397    pub const DEFAULT: Self = Self {
7398        ar_u32: [0_u32; 4usize],
7399        v: 0_u8,
7400    };
7401    #[cfg(feature = "arbitrary")]
7402    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7403        use arbitrary::{Arbitrary, Unstructured};
7404        let mut buf = [0u8; 1024];
7405        rng.fill_bytes(&mut buf);
7406        let mut unstructured = Unstructured::new(&buf);
7407        Self::arbitrary(&mut unstructured).unwrap_or_default()
7408    }
7409}
7410impl Default for ARRAY_TEST_4_DATA {
7411    fn default() -> Self {
7412        Self::DEFAULT.clone()
7413    }
7414}
7415impl MessageData for ARRAY_TEST_4_DATA {
7416    type Message = MavMessage;
7417    const ID: u32 = 17154u32;
7418    const NAME: &'static str = "ARRAY_TEST_4";
7419    const EXTRA_CRC: u8 = 89u8;
7420    const ENCODED_LEN: usize = 17usize;
7421    fn deser(
7422        _version: MavlinkVersion,
7423        __input: &[u8],
7424    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7425        let avail_len = __input.len();
7426        let mut payload_buf = [0; Self::ENCODED_LEN];
7427        let mut buf = if avail_len < Self::ENCODED_LEN {
7428            payload_buf[0..avail_len].copy_from_slice(__input);
7429            Bytes::new(&payload_buf)
7430        } else {
7431            Bytes::new(__input)
7432        };
7433        let mut __struct = Self::default();
7434        for v in &mut __struct.ar_u32 {
7435            let val = buf.get_u32_le()?;
7436            *v = val;
7437        }
7438        __struct.v = buf.get_u8()?;
7439        Ok(__struct)
7440    }
7441    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7442        let mut __tmp = BytesMut::new(bytes);
7443        #[allow(clippy::absurd_extreme_comparisons)]
7444        #[allow(unused_comparisons)]
7445        if __tmp.remaining() < Self::ENCODED_LEN {
7446            panic!(
7447                "buffer is too small (need {} bytes, but got {})",
7448                Self::ENCODED_LEN,
7449                __tmp.remaining(),
7450            )
7451        }
7452        for val in &self.ar_u32 {
7453            __tmp.put_u32_le(*val);
7454        }
7455        __tmp.put_u8(self.v);
7456        if matches!(version, MavlinkVersion::V2) {
7457            let len = __tmp.len();
7458            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7459        } else {
7460            __tmp.len()
7461        }
7462    }
7463}
7464#[doc = "Array test #5."]
7465#[doc = ""]
7466#[doc = "ID: 17155"]
7467#[derive(Debug, Clone, PartialEq)]
7468#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7469#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7470#[cfg_attr(feature = "ts", derive(TS))]
7471#[cfg_attr(feature = "ts", ts(export))]
7472pub struct ARRAY_TEST_5_DATA {
7473    #[doc = "Value array"]
7474    #[cfg_attr(feature = "ts", ts(type = "string"))]
7475    pub c1: CharArray<5>,
7476    #[doc = "Value array"]
7477    #[cfg_attr(feature = "ts", ts(type = "string"))]
7478    pub c2: CharArray<5>,
7479}
7480impl ARRAY_TEST_5_DATA {
7481    pub const ENCODED_LEN: usize = 10usize;
7482    pub const DEFAULT: Self = Self {
7483        c1: CharArray::new([0_u8; 5usize]),
7484        c2: CharArray::new([0_u8; 5usize]),
7485    };
7486    #[cfg(feature = "arbitrary")]
7487    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7488        use arbitrary::{Arbitrary, Unstructured};
7489        let mut buf = [0u8; 1024];
7490        rng.fill_bytes(&mut buf);
7491        let mut unstructured = Unstructured::new(&buf);
7492        Self::arbitrary(&mut unstructured).unwrap_or_default()
7493    }
7494}
7495impl Default for ARRAY_TEST_5_DATA {
7496    fn default() -> Self {
7497        Self::DEFAULT.clone()
7498    }
7499}
7500impl MessageData for ARRAY_TEST_5_DATA {
7501    type Message = MavMessage;
7502    const ID: u32 = 17155u32;
7503    const NAME: &'static str = "ARRAY_TEST_5";
7504    const EXTRA_CRC: u8 = 27u8;
7505    const ENCODED_LEN: usize = 10usize;
7506    fn deser(
7507        _version: MavlinkVersion,
7508        __input: &[u8],
7509    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7510        let avail_len = __input.len();
7511        let mut payload_buf = [0; Self::ENCODED_LEN];
7512        let mut buf = if avail_len < Self::ENCODED_LEN {
7513            payload_buf[0..avail_len].copy_from_slice(__input);
7514            Bytes::new(&payload_buf)
7515        } else {
7516            Bytes::new(__input)
7517        };
7518        let mut __struct = Self::default();
7519        let mut tmp = [0_u8; 5usize];
7520        for v in &mut tmp {
7521            *v = buf.get_u8()?;
7522        }
7523        __struct.c1 = CharArray::new(tmp);
7524        let mut tmp = [0_u8; 5usize];
7525        for v in &mut tmp {
7526            *v = buf.get_u8()?;
7527        }
7528        __struct.c2 = CharArray::new(tmp);
7529        Ok(__struct)
7530    }
7531    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7532        let mut __tmp = BytesMut::new(bytes);
7533        #[allow(clippy::absurd_extreme_comparisons)]
7534        #[allow(unused_comparisons)]
7535        if __tmp.remaining() < Self::ENCODED_LEN {
7536            panic!(
7537                "buffer is too small (need {} bytes, but got {})",
7538                Self::ENCODED_LEN,
7539                __tmp.remaining(),
7540            )
7541        }
7542        for val in &self.c1 {
7543            __tmp.put_u8(*val);
7544        }
7545        for val in &self.c2 {
7546            __tmp.put_u8(*val);
7547        }
7548        if matches!(version, MavlinkVersion::V2) {
7549            let len = __tmp.len();
7550            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7551        } else {
7552            __tmp.len()
7553        }
7554    }
7555}
7556#[doc = "Array test #6."]
7557#[doc = ""]
7558#[doc = "ID: 17156"]
7559#[derive(Debug, Clone, PartialEq)]
7560#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7561#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7562#[cfg_attr(feature = "ts", derive(TS))]
7563#[cfg_attr(feature = "ts", ts(export))]
7564pub struct ARRAY_TEST_6_DATA {
7565    #[doc = "Value array"]
7566    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7567    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7568    pub ar_d: [f64; 2],
7569    #[doc = "Stub field"]
7570    pub v3: u32,
7571    #[doc = "Value array"]
7572    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7573    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7574    pub ar_u32: [u32; 2],
7575    #[doc = "Value array"]
7576    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7577    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7578    pub ar_i32: [i32; 2],
7579    #[doc = "Value array"]
7580    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7581    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7582    pub ar_f: [f32; 2],
7583    #[doc = "Stub field"]
7584    pub v2: u16,
7585    #[doc = "Value array"]
7586    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7587    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7588    pub ar_u16: [u16; 2],
7589    #[doc = "Value array"]
7590    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7591    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7592    pub ar_i16: [i16; 2],
7593    #[doc = "Stub field"]
7594    pub v1: u8,
7595    #[doc = "Value array"]
7596    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7597    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7598    pub ar_u8: [u8; 2],
7599    #[doc = "Value array"]
7600    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7601    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7602    pub ar_i8: [i8; 2],
7603    #[doc = "Value array"]
7604    #[cfg_attr(feature = "ts", ts(type = "string"))]
7605    pub ar_c: CharArray<32>,
7606}
7607impl ARRAY_TEST_6_DATA {
7608    pub const ENCODED_LEN: usize = 91usize;
7609    pub const DEFAULT: Self = Self {
7610        ar_d: [0.0_f64; 2usize],
7611        v3: 0_u32,
7612        ar_u32: [0_u32; 2usize],
7613        ar_i32: [0_i32; 2usize],
7614        ar_f: [0.0_f32; 2usize],
7615        v2: 0_u16,
7616        ar_u16: [0_u16; 2usize],
7617        ar_i16: [0_i16; 2usize],
7618        v1: 0_u8,
7619        ar_u8: [0_u8; 2usize],
7620        ar_i8: [0_i8; 2usize],
7621        ar_c: CharArray::new([0_u8; 32usize]),
7622    };
7623    #[cfg(feature = "arbitrary")]
7624    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7625        use arbitrary::{Arbitrary, Unstructured};
7626        let mut buf = [0u8; 1024];
7627        rng.fill_bytes(&mut buf);
7628        let mut unstructured = Unstructured::new(&buf);
7629        Self::arbitrary(&mut unstructured).unwrap_or_default()
7630    }
7631}
7632impl Default for ARRAY_TEST_6_DATA {
7633    fn default() -> Self {
7634        Self::DEFAULT.clone()
7635    }
7636}
7637impl MessageData for ARRAY_TEST_6_DATA {
7638    type Message = MavMessage;
7639    const ID: u32 = 17156u32;
7640    const NAME: &'static str = "ARRAY_TEST_6";
7641    const EXTRA_CRC: u8 = 14u8;
7642    const ENCODED_LEN: usize = 91usize;
7643    fn deser(
7644        _version: MavlinkVersion,
7645        __input: &[u8],
7646    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7647        let avail_len = __input.len();
7648        let mut payload_buf = [0; Self::ENCODED_LEN];
7649        let mut buf = if avail_len < Self::ENCODED_LEN {
7650            payload_buf[0..avail_len].copy_from_slice(__input);
7651            Bytes::new(&payload_buf)
7652        } else {
7653            Bytes::new(__input)
7654        };
7655        let mut __struct = Self::default();
7656        for v in &mut __struct.ar_d {
7657            let val = buf.get_f64_le()?;
7658            *v = val;
7659        }
7660        __struct.v3 = buf.get_u32_le()?;
7661        for v in &mut __struct.ar_u32 {
7662            let val = buf.get_u32_le()?;
7663            *v = val;
7664        }
7665        for v in &mut __struct.ar_i32 {
7666            let val = buf.get_i32_le()?;
7667            *v = val;
7668        }
7669        for v in &mut __struct.ar_f {
7670            let val = buf.get_f32_le()?;
7671            *v = val;
7672        }
7673        __struct.v2 = buf.get_u16_le()?;
7674        for v in &mut __struct.ar_u16 {
7675            let val = buf.get_u16_le()?;
7676            *v = val;
7677        }
7678        for v in &mut __struct.ar_i16 {
7679            let val = buf.get_i16_le()?;
7680            *v = val;
7681        }
7682        __struct.v1 = buf.get_u8()?;
7683        for v in &mut __struct.ar_u8 {
7684            let val = buf.get_u8()?;
7685            *v = val;
7686        }
7687        for v in &mut __struct.ar_i8 {
7688            let val = buf.get_i8()?;
7689            *v = val;
7690        }
7691        let mut tmp = [0_u8; 32usize];
7692        for v in &mut tmp {
7693            *v = buf.get_u8()?;
7694        }
7695        __struct.ar_c = CharArray::new(tmp);
7696        Ok(__struct)
7697    }
7698    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7699        let mut __tmp = BytesMut::new(bytes);
7700        #[allow(clippy::absurd_extreme_comparisons)]
7701        #[allow(unused_comparisons)]
7702        if __tmp.remaining() < Self::ENCODED_LEN {
7703            panic!(
7704                "buffer is too small (need {} bytes, but got {})",
7705                Self::ENCODED_LEN,
7706                __tmp.remaining(),
7707            )
7708        }
7709        for val in &self.ar_d {
7710            __tmp.put_f64_le(*val);
7711        }
7712        __tmp.put_u32_le(self.v3);
7713        for val in &self.ar_u32 {
7714            __tmp.put_u32_le(*val);
7715        }
7716        for val in &self.ar_i32 {
7717            __tmp.put_i32_le(*val);
7718        }
7719        for val in &self.ar_f {
7720            __tmp.put_f32_le(*val);
7721        }
7722        __tmp.put_u16_le(self.v2);
7723        for val in &self.ar_u16 {
7724            __tmp.put_u16_le(*val);
7725        }
7726        for val in &self.ar_i16 {
7727            __tmp.put_i16_le(*val);
7728        }
7729        __tmp.put_u8(self.v1);
7730        for val in &self.ar_u8 {
7731            __tmp.put_u8(*val);
7732        }
7733        for val in &self.ar_i8 {
7734            __tmp.put_i8(*val);
7735        }
7736        for val in &self.ar_c {
7737            __tmp.put_u8(*val);
7738        }
7739        if matches!(version, MavlinkVersion::V2) {
7740            let len = __tmp.len();
7741            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7742        } else {
7743            __tmp.len()
7744        }
7745    }
7746}
7747#[doc = "Array test #7."]
7748#[doc = ""]
7749#[doc = "ID: 17157"]
7750#[derive(Debug, Clone, PartialEq)]
7751#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7752#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7753#[cfg_attr(feature = "ts", derive(TS))]
7754#[cfg_attr(feature = "ts", ts(export))]
7755pub struct ARRAY_TEST_7_DATA {
7756    #[doc = "Value array"]
7757    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7758    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7759    pub ar_d: [f64; 2],
7760    #[doc = "Value array"]
7761    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7762    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7763    pub ar_f: [f32; 2],
7764    #[doc = "Value array"]
7765    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7766    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7767    pub ar_u32: [u32; 2],
7768    #[doc = "Value array"]
7769    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7770    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7771    pub ar_i32: [i32; 2],
7772    #[doc = "Value array"]
7773    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7774    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7775    pub ar_u16: [u16; 2],
7776    #[doc = "Value array"]
7777    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7778    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7779    pub ar_i16: [i16; 2],
7780    #[doc = "Value array"]
7781    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7782    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7783    pub ar_u8: [u8; 2],
7784    #[doc = "Value array"]
7785    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7786    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7787    pub ar_i8: [i8; 2],
7788    #[doc = "Value array"]
7789    #[cfg_attr(feature = "ts", ts(type = "string"))]
7790    pub ar_c: CharArray<32>,
7791}
7792impl ARRAY_TEST_7_DATA {
7793    pub const ENCODED_LEN: usize = 84usize;
7794    pub const DEFAULT: Self = Self {
7795        ar_d: [0.0_f64; 2usize],
7796        ar_f: [0.0_f32; 2usize],
7797        ar_u32: [0_u32; 2usize],
7798        ar_i32: [0_i32; 2usize],
7799        ar_u16: [0_u16; 2usize],
7800        ar_i16: [0_i16; 2usize],
7801        ar_u8: [0_u8; 2usize],
7802        ar_i8: [0_i8; 2usize],
7803        ar_c: CharArray::new([0_u8; 32usize]),
7804    };
7805    #[cfg(feature = "arbitrary")]
7806    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7807        use arbitrary::{Arbitrary, Unstructured};
7808        let mut buf = [0u8; 1024];
7809        rng.fill_bytes(&mut buf);
7810        let mut unstructured = Unstructured::new(&buf);
7811        Self::arbitrary(&mut unstructured).unwrap_or_default()
7812    }
7813}
7814impl Default for ARRAY_TEST_7_DATA {
7815    fn default() -> Self {
7816        Self::DEFAULT.clone()
7817    }
7818}
7819impl MessageData for ARRAY_TEST_7_DATA {
7820    type Message = MavMessage;
7821    const ID: u32 = 17157u32;
7822    const NAME: &'static str = "ARRAY_TEST_7";
7823    const EXTRA_CRC: u8 = 187u8;
7824    const ENCODED_LEN: usize = 84usize;
7825    fn deser(
7826        _version: MavlinkVersion,
7827        __input: &[u8],
7828    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7829        let avail_len = __input.len();
7830        let mut payload_buf = [0; Self::ENCODED_LEN];
7831        let mut buf = if avail_len < Self::ENCODED_LEN {
7832            payload_buf[0..avail_len].copy_from_slice(__input);
7833            Bytes::new(&payload_buf)
7834        } else {
7835            Bytes::new(__input)
7836        };
7837        let mut __struct = Self::default();
7838        for v in &mut __struct.ar_d {
7839            let val = buf.get_f64_le()?;
7840            *v = val;
7841        }
7842        for v in &mut __struct.ar_f {
7843            let val = buf.get_f32_le()?;
7844            *v = val;
7845        }
7846        for v in &mut __struct.ar_u32 {
7847            let val = buf.get_u32_le()?;
7848            *v = val;
7849        }
7850        for v in &mut __struct.ar_i32 {
7851            let val = buf.get_i32_le()?;
7852            *v = val;
7853        }
7854        for v in &mut __struct.ar_u16 {
7855            let val = buf.get_u16_le()?;
7856            *v = val;
7857        }
7858        for v in &mut __struct.ar_i16 {
7859            let val = buf.get_i16_le()?;
7860            *v = val;
7861        }
7862        for v in &mut __struct.ar_u8 {
7863            let val = buf.get_u8()?;
7864            *v = val;
7865        }
7866        for v in &mut __struct.ar_i8 {
7867            let val = buf.get_i8()?;
7868            *v = val;
7869        }
7870        let mut tmp = [0_u8; 32usize];
7871        for v in &mut tmp {
7872            *v = buf.get_u8()?;
7873        }
7874        __struct.ar_c = CharArray::new(tmp);
7875        Ok(__struct)
7876    }
7877    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7878        let mut __tmp = BytesMut::new(bytes);
7879        #[allow(clippy::absurd_extreme_comparisons)]
7880        #[allow(unused_comparisons)]
7881        if __tmp.remaining() < Self::ENCODED_LEN {
7882            panic!(
7883                "buffer is too small (need {} bytes, but got {})",
7884                Self::ENCODED_LEN,
7885                __tmp.remaining(),
7886            )
7887        }
7888        for val in &self.ar_d {
7889            __tmp.put_f64_le(*val);
7890        }
7891        for val in &self.ar_f {
7892            __tmp.put_f32_le(*val);
7893        }
7894        for val in &self.ar_u32 {
7895            __tmp.put_u32_le(*val);
7896        }
7897        for val in &self.ar_i32 {
7898            __tmp.put_i32_le(*val);
7899        }
7900        for val in &self.ar_u16 {
7901            __tmp.put_u16_le(*val);
7902        }
7903        for val in &self.ar_i16 {
7904            __tmp.put_i16_le(*val);
7905        }
7906        for val in &self.ar_u8 {
7907            __tmp.put_u8(*val);
7908        }
7909        for val in &self.ar_i8 {
7910            __tmp.put_i8(*val);
7911        }
7912        for val in &self.ar_c {
7913            __tmp.put_u8(*val);
7914        }
7915        if matches!(version, MavlinkVersion::V2) {
7916            let len = __tmp.len();
7917            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7918        } else {
7919            __tmp.len()
7920        }
7921    }
7922}
7923#[doc = "Array test #8."]
7924#[doc = ""]
7925#[doc = "ID: 17158"]
7926#[derive(Debug, Clone, PartialEq)]
7927#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7928#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7929#[cfg_attr(feature = "ts", derive(TS))]
7930#[cfg_attr(feature = "ts", ts(export))]
7931pub struct ARRAY_TEST_8_DATA {
7932    #[doc = "Value array"]
7933    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7934    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7935    pub ar_d: [f64; 2],
7936    #[doc = "Stub field"]
7937    pub v3: u32,
7938    #[doc = "Value array"]
7939    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7940    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7941    pub ar_u16: [u16; 2],
7942}
7943impl ARRAY_TEST_8_DATA {
7944    pub const ENCODED_LEN: usize = 24usize;
7945    pub const DEFAULT: Self = Self {
7946        ar_d: [0.0_f64; 2usize],
7947        v3: 0_u32,
7948        ar_u16: [0_u16; 2usize],
7949    };
7950    #[cfg(feature = "arbitrary")]
7951    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7952        use arbitrary::{Arbitrary, Unstructured};
7953        let mut buf = [0u8; 1024];
7954        rng.fill_bytes(&mut buf);
7955        let mut unstructured = Unstructured::new(&buf);
7956        Self::arbitrary(&mut unstructured).unwrap_or_default()
7957    }
7958}
7959impl Default for ARRAY_TEST_8_DATA {
7960    fn default() -> Self {
7961        Self::DEFAULT.clone()
7962    }
7963}
7964impl MessageData for ARRAY_TEST_8_DATA {
7965    type Message = MavMessage;
7966    const ID: u32 = 17158u32;
7967    const NAME: &'static str = "ARRAY_TEST_8";
7968    const EXTRA_CRC: u8 = 106u8;
7969    const ENCODED_LEN: usize = 24usize;
7970    fn deser(
7971        _version: MavlinkVersion,
7972        __input: &[u8],
7973    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7974        let avail_len = __input.len();
7975        let mut payload_buf = [0; Self::ENCODED_LEN];
7976        let mut buf = if avail_len < Self::ENCODED_LEN {
7977            payload_buf[0..avail_len].copy_from_slice(__input);
7978            Bytes::new(&payload_buf)
7979        } else {
7980            Bytes::new(__input)
7981        };
7982        let mut __struct = Self::default();
7983        for v in &mut __struct.ar_d {
7984            let val = buf.get_f64_le()?;
7985            *v = val;
7986        }
7987        __struct.v3 = buf.get_u32_le()?;
7988        for v in &mut __struct.ar_u16 {
7989            let val = buf.get_u16_le()?;
7990            *v = val;
7991        }
7992        Ok(__struct)
7993    }
7994    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7995        let mut __tmp = BytesMut::new(bytes);
7996        #[allow(clippy::absurd_extreme_comparisons)]
7997        #[allow(unused_comparisons)]
7998        if __tmp.remaining() < Self::ENCODED_LEN {
7999            panic!(
8000                "buffer is too small (need {} bytes, but got {})",
8001                Self::ENCODED_LEN,
8002                __tmp.remaining(),
8003            )
8004        }
8005        for val in &self.ar_d {
8006            __tmp.put_f64_le(*val);
8007        }
8008        __tmp.put_u32_le(self.v3);
8009        for val in &self.ar_u16 {
8010            __tmp.put_u16_le(*val);
8011        }
8012        if matches!(version, MavlinkVersion::V2) {
8013            let len = __tmp.len();
8014            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8015        } else {
8016            __tmp.len()
8017        }
8018    }
8019}
8020#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
8021#[doc = ""]
8022#[doc = "ID: 30"]
8023#[derive(Debug, Clone, PartialEq)]
8024#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8025#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8026#[cfg_attr(feature = "ts", derive(TS))]
8027#[cfg_attr(feature = "ts", ts(export))]
8028pub struct ATTITUDE_DATA {
8029    #[doc = "Timestamp (time since system boot)."]
8030    pub time_boot_ms: u32,
8031    #[doc = "Roll angle (-pi..+pi)"]
8032    pub roll: f32,
8033    #[doc = "Pitch angle (-pi..+pi)"]
8034    pub pitch: f32,
8035    #[doc = "Yaw angle (-pi..+pi)"]
8036    pub yaw: f32,
8037    #[doc = "Roll angular speed"]
8038    pub rollspeed: f32,
8039    #[doc = "Pitch angular speed"]
8040    pub pitchspeed: f32,
8041    #[doc = "Yaw angular speed"]
8042    pub yawspeed: f32,
8043}
8044impl ATTITUDE_DATA {
8045    pub const ENCODED_LEN: usize = 28usize;
8046    pub const DEFAULT: Self = Self {
8047        time_boot_ms: 0_u32,
8048        roll: 0.0_f32,
8049        pitch: 0.0_f32,
8050        yaw: 0.0_f32,
8051        rollspeed: 0.0_f32,
8052        pitchspeed: 0.0_f32,
8053        yawspeed: 0.0_f32,
8054    };
8055    #[cfg(feature = "arbitrary")]
8056    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8057        use arbitrary::{Arbitrary, Unstructured};
8058        let mut buf = [0u8; 1024];
8059        rng.fill_bytes(&mut buf);
8060        let mut unstructured = Unstructured::new(&buf);
8061        Self::arbitrary(&mut unstructured).unwrap_or_default()
8062    }
8063}
8064impl Default for ATTITUDE_DATA {
8065    fn default() -> Self {
8066        Self::DEFAULT.clone()
8067    }
8068}
8069impl MessageData for ATTITUDE_DATA {
8070    type Message = MavMessage;
8071    const ID: u32 = 30u32;
8072    const NAME: &'static str = "ATTITUDE";
8073    const EXTRA_CRC: u8 = 39u8;
8074    const ENCODED_LEN: usize = 28usize;
8075    fn deser(
8076        _version: MavlinkVersion,
8077        __input: &[u8],
8078    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8079        let avail_len = __input.len();
8080        let mut payload_buf = [0; Self::ENCODED_LEN];
8081        let mut buf = if avail_len < Self::ENCODED_LEN {
8082            payload_buf[0..avail_len].copy_from_slice(__input);
8083            Bytes::new(&payload_buf)
8084        } else {
8085            Bytes::new(__input)
8086        };
8087        let mut __struct = Self::default();
8088        __struct.time_boot_ms = buf.get_u32_le()?;
8089        __struct.roll = buf.get_f32_le()?;
8090        __struct.pitch = buf.get_f32_le()?;
8091        __struct.yaw = buf.get_f32_le()?;
8092        __struct.rollspeed = buf.get_f32_le()?;
8093        __struct.pitchspeed = buf.get_f32_le()?;
8094        __struct.yawspeed = buf.get_f32_le()?;
8095        Ok(__struct)
8096    }
8097    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8098        let mut __tmp = BytesMut::new(bytes);
8099        #[allow(clippy::absurd_extreme_comparisons)]
8100        #[allow(unused_comparisons)]
8101        if __tmp.remaining() < Self::ENCODED_LEN {
8102            panic!(
8103                "buffer is too small (need {} bytes, but got {})",
8104                Self::ENCODED_LEN,
8105                __tmp.remaining(),
8106            )
8107        }
8108        __tmp.put_u32_le(self.time_boot_ms);
8109        __tmp.put_f32_le(self.roll);
8110        __tmp.put_f32_le(self.pitch);
8111        __tmp.put_f32_le(self.yaw);
8112        __tmp.put_f32_le(self.rollspeed);
8113        __tmp.put_f32_le(self.pitchspeed);
8114        __tmp.put_f32_le(self.yawspeed);
8115        if matches!(version, MavlinkVersion::V2) {
8116            let len = __tmp.len();
8117            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8118        } else {
8119            __tmp.len()
8120        }
8121    }
8122}
8123#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
8124#[doc = ""]
8125#[doc = "ID: 31"]
8126#[derive(Debug, Clone, PartialEq)]
8127#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8128#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8129#[cfg_attr(feature = "ts", derive(TS))]
8130#[cfg_attr(feature = "ts", ts(export))]
8131pub struct ATTITUDE_QUATERNION_DATA {
8132    #[doc = "Timestamp (time since system boot)."]
8133    pub time_boot_ms: u32,
8134    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
8135    pub q1: f32,
8136    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
8137    pub q2: f32,
8138    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
8139    pub q3: f32,
8140    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
8141    pub q4: f32,
8142    #[doc = "Roll angular speed"]
8143    pub rollspeed: f32,
8144    #[doc = "Pitch angular speed"]
8145    pub pitchspeed: f32,
8146    #[doc = "Yaw angular speed"]
8147    pub yawspeed: f32,
8148    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
8149    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8150    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8151    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8152    pub repr_offset_q: [f32; 4],
8153}
8154impl ATTITUDE_QUATERNION_DATA {
8155    pub const ENCODED_LEN: usize = 48usize;
8156    pub const DEFAULT: Self = Self {
8157        time_boot_ms: 0_u32,
8158        q1: 0.0_f32,
8159        q2: 0.0_f32,
8160        q3: 0.0_f32,
8161        q4: 0.0_f32,
8162        rollspeed: 0.0_f32,
8163        pitchspeed: 0.0_f32,
8164        yawspeed: 0.0_f32,
8165        repr_offset_q: [0.0_f32; 4usize],
8166    };
8167    #[cfg(feature = "arbitrary")]
8168    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8169        use arbitrary::{Arbitrary, Unstructured};
8170        let mut buf = [0u8; 1024];
8171        rng.fill_bytes(&mut buf);
8172        let mut unstructured = Unstructured::new(&buf);
8173        Self::arbitrary(&mut unstructured).unwrap_or_default()
8174    }
8175}
8176impl Default for ATTITUDE_QUATERNION_DATA {
8177    fn default() -> Self {
8178        Self::DEFAULT.clone()
8179    }
8180}
8181impl MessageData for ATTITUDE_QUATERNION_DATA {
8182    type Message = MavMessage;
8183    const ID: u32 = 31u32;
8184    const NAME: &'static str = "ATTITUDE_QUATERNION";
8185    const EXTRA_CRC: u8 = 246u8;
8186    const ENCODED_LEN: usize = 48usize;
8187    fn deser(
8188        _version: MavlinkVersion,
8189        __input: &[u8],
8190    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8191        let avail_len = __input.len();
8192        let mut payload_buf = [0; Self::ENCODED_LEN];
8193        let mut buf = if avail_len < Self::ENCODED_LEN {
8194            payload_buf[0..avail_len].copy_from_slice(__input);
8195            Bytes::new(&payload_buf)
8196        } else {
8197            Bytes::new(__input)
8198        };
8199        let mut __struct = Self::default();
8200        __struct.time_boot_ms = buf.get_u32_le()?;
8201        __struct.q1 = buf.get_f32_le()?;
8202        __struct.q2 = buf.get_f32_le()?;
8203        __struct.q3 = buf.get_f32_le()?;
8204        __struct.q4 = buf.get_f32_le()?;
8205        __struct.rollspeed = buf.get_f32_le()?;
8206        __struct.pitchspeed = buf.get_f32_le()?;
8207        __struct.yawspeed = buf.get_f32_le()?;
8208        for v in &mut __struct.repr_offset_q {
8209            let val = buf.get_f32_le()?;
8210            *v = val;
8211        }
8212        Ok(__struct)
8213    }
8214    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8215        let mut __tmp = BytesMut::new(bytes);
8216        #[allow(clippy::absurd_extreme_comparisons)]
8217        #[allow(unused_comparisons)]
8218        if __tmp.remaining() < Self::ENCODED_LEN {
8219            panic!(
8220                "buffer is too small (need {} bytes, but got {})",
8221                Self::ENCODED_LEN,
8222                __tmp.remaining(),
8223            )
8224        }
8225        __tmp.put_u32_le(self.time_boot_ms);
8226        __tmp.put_f32_le(self.q1);
8227        __tmp.put_f32_le(self.q2);
8228        __tmp.put_f32_le(self.q3);
8229        __tmp.put_f32_le(self.q4);
8230        __tmp.put_f32_le(self.rollspeed);
8231        __tmp.put_f32_le(self.pitchspeed);
8232        __tmp.put_f32_le(self.yawspeed);
8233        if matches!(version, MavlinkVersion::V2) {
8234            for val in &self.repr_offset_q {
8235                __tmp.put_f32_le(*val);
8236            }
8237            let len = __tmp.len();
8238            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8239        } else {
8240            __tmp.len()
8241        }
8242    }
8243}
8244#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
8245#[doc = ""]
8246#[doc = "ID: 61"]
8247#[derive(Debug, Clone, PartialEq)]
8248#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8249#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8250#[cfg_attr(feature = "ts", derive(TS))]
8251#[cfg_attr(feature = "ts", ts(export))]
8252pub struct ATTITUDE_QUATERNION_COV_DATA {
8253    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
8254    pub time_usec: u64,
8255    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
8256    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8257    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8258    pub q: [f32; 4],
8259    #[doc = "Roll angular speed"]
8260    pub rollspeed: f32,
8261    #[doc = "Pitch angular speed"]
8262    pub pitchspeed: f32,
8263    #[doc = "Yaw angular speed"]
8264    pub yawspeed: f32,
8265    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
8266    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8267    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8268    pub covariance: [f32; 9],
8269}
8270impl ATTITUDE_QUATERNION_COV_DATA {
8271    pub const ENCODED_LEN: usize = 72usize;
8272    pub const DEFAULT: Self = Self {
8273        time_usec: 0_u64,
8274        q: [0.0_f32; 4usize],
8275        rollspeed: 0.0_f32,
8276        pitchspeed: 0.0_f32,
8277        yawspeed: 0.0_f32,
8278        covariance: [0.0_f32; 9usize],
8279    };
8280    #[cfg(feature = "arbitrary")]
8281    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8282        use arbitrary::{Arbitrary, Unstructured};
8283        let mut buf = [0u8; 1024];
8284        rng.fill_bytes(&mut buf);
8285        let mut unstructured = Unstructured::new(&buf);
8286        Self::arbitrary(&mut unstructured).unwrap_or_default()
8287    }
8288}
8289impl Default for ATTITUDE_QUATERNION_COV_DATA {
8290    fn default() -> Self {
8291        Self::DEFAULT.clone()
8292    }
8293}
8294impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
8295    type Message = MavMessage;
8296    const ID: u32 = 61u32;
8297    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
8298    const EXTRA_CRC: u8 = 167u8;
8299    const ENCODED_LEN: usize = 72usize;
8300    fn deser(
8301        _version: MavlinkVersion,
8302        __input: &[u8],
8303    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8304        let avail_len = __input.len();
8305        let mut payload_buf = [0; Self::ENCODED_LEN];
8306        let mut buf = if avail_len < Self::ENCODED_LEN {
8307            payload_buf[0..avail_len].copy_from_slice(__input);
8308            Bytes::new(&payload_buf)
8309        } else {
8310            Bytes::new(__input)
8311        };
8312        let mut __struct = Self::default();
8313        __struct.time_usec = buf.get_u64_le()?;
8314        for v in &mut __struct.q {
8315            let val = buf.get_f32_le()?;
8316            *v = val;
8317        }
8318        __struct.rollspeed = buf.get_f32_le()?;
8319        __struct.pitchspeed = buf.get_f32_le()?;
8320        __struct.yawspeed = buf.get_f32_le()?;
8321        for v in &mut __struct.covariance {
8322            let val = buf.get_f32_le()?;
8323            *v = val;
8324        }
8325        Ok(__struct)
8326    }
8327    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8328        let mut __tmp = BytesMut::new(bytes);
8329        #[allow(clippy::absurd_extreme_comparisons)]
8330        #[allow(unused_comparisons)]
8331        if __tmp.remaining() < Self::ENCODED_LEN {
8332            panic!(
8333                "buffer is too small (need {} bytes, but got {})",
8334                Self::ENCODED_LEN,
8335                __tmp.remaining(),
8336            )
8337        }
8338        __tmp.put_u64_le(self.time_usec);
8339        for val in &self.q {
8340            __tmp.put_f32_le(*val);
8341        }
8342        __tmp.put_f32_le(self.rollspeed);
8343        __tmp.put_f32_le(self.pitchspeed);
8344        __tmp.put_f32_le(self.yawspeed);
8345        for val in &self.covariance {
8346            __tmp.put_f32_le(*val);
8347        }
8348        if matches!(version, MavlinkVersion::V2) {
8349            let len = __tmp.len();
8350            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8351        } else {
8352            __tmp.len()
8353        }
8354    }
8355}
8356#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
8357#[doc = ""]
8358#[doc = "ID: 83"]
8359#[derive(Debug, Clone, PartialEq)]
8360#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8361#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8362#[cfg_attr(feature = "ts", derive(TS))]
8363#[cfg_attr(feature = "ts", ts(export))]
8364pub struct ATTITUDE_TARGET_DATA {
8365    #[doc = "Timestamp (time since system boot)."]
8366    pub time_boot_ms: u32,
8367    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
8368    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8369    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8370    pub q: [f32; 4],
8371    #[doc = "Body roll rate"]
8372    pub body_roll_rate: f32,
8373    #[doc = "Body pitch rate"]
8374    pub body_pitch_rate: f32,
8375    #[doc = "Body yaw rate"]
8376    pub body_yaw_rate: f32,
8377    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
8378    pub thrust: f32,
8379    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
8380    pub type_mask: AttitudeTargetTypemask,
8381}
8382impl ATTITUDE_TARGET_DATA {
8383    pub const ENCODED_LEN: usize = 37usize;
8384    pub const DEFAULT: Self = Self {
8385        time_boot_ms: 0_u32,
8386        q: [0.0_f32; 4usize],
8387        body_roll_rate: 0.0_f32,
8388        body_pitch_rate: 0.0_f32,
8389        body_yaw_rate: 0.0_f32,
8390        thrust: 0.0_f32,
8391        type_mask: AttitudeTargetTypemask::DEFAULT,
8392    };
8393    #[cfg(feature = "arbitrary")]
8394    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8395        use arbitrary::{Arbitrary, Unstructured};
8396        let mut buf = [0u8; 1024];
8397        rng.fill_bytes(&mut buf);
8398        let mut unstructured = Unstructured::new(&buf);
8399        Self::arbitrary(&mut unstructured).unwrap_or_default()
8400    }
8401}
8402impl Default for ATTITUDE_TARGET_DATA {
8403    fn default() -> Self {
8404        Self::DEFAULT.clone()
8405    }
8406}
8407impl MessageData for ATTITUDE_TARGET_DATA {
8408    type Message = MavMessage;
8409    const ID: u32 = 83u32;
8410    const NAME: &'static str = "ATTITUDE_TARGET";
8411    const EXTRA_CRC: u8 = 22u8;
8412    const ENCODED_LEN: usize = 37usize;
8413    fn deser(
8414        _version: MavlinkVersion,
8415        __input: &[u8],
8416    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8417        let avail_len = __input.len();
8418        let mut payload_buf = [0; Self::ENCODED_LEN];
8419        let mut buf = if avail_len < Self::ENCODED_LEN {
8420            payload_buf[0..avail_len].copy_from_slice(__input);
8421            Bytes::new(&payload_buf)
8422        } else {
8423            Bytes::new(__input)
8424        };
8425        let mut __struct = Self::default();
8426        __struct.time_boot_ms = buf.get_u32_le()?;
8427        for v in &mut __struct.q {
8428            let val = buf.get_f32_le()?;
8429            *v = val;
8430        }
8431        __struct.body_roll_rate = buf.get_f32_le()?;
8432        __struct.body_pitch_rate = buf.get_f32_le()?;
8433        __struct.body_yaw_rate = buf.get_f32_le()?;
8434        __struct.thrust = buf.get_f32_le()?;
8435        let tmp = buf.get_u8()?;
8436        __struct.type_mask =
8437            AttitudeTargetTypemask::from_bits(tmp as <AttitudeTargetTypemask as Flags>::Bits)
8438                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
8439                    flag_type: "AttitudeTargetTypemask",
8440                    value: tmp as u64,
8441                })?;
8442        Ok(__struct)
8443    }
8444    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8445        let mut __tmp = BytesMut::new(bytes);
8446        #[allow(clippy::absurd_extreme_comparisons)]
8447        #[allow(unused_comparisons)]
8448        if __tmp.remaining() < Self::ENCODED_LEN {
8449            panic!(
8450                "buffer is too small (need {} bytes, but got {})",
8451                Self::ENCODED_LEN,
8452                __tmp.remaining(),
8453            )
8454        }
8455        __tmp.put_u32_le(self.time_boot_ms);
8456        for val in &self.q {
8457            __tmp.put_f32_le(*val);
8458        }
8459        __tmp.put_f32_le(self.body_roll_rate);
8460        __tmp.put_f32_le(self.body_pitch_rate);
8461        __tmp.put_f32_le(self.body_yaw_rate);
8462        __tmp.put_f32_le(self.thrust);
8463        __tmp.put_u8(self.type_mask.bits() as u8);
8464        if matches!(version, MavlinkVersion::V2) {
8465            let len = __tmp.len();
8466            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8467        } else {
8468            __tmp.len()
8469        }
8470    }
8471}
8472#[doc = "Motion capture attitude and position."]
8473#[doc = ""]
8474#[doc = "ID: 138"]
8475#[derive(Debug, Clone, PartialEq)]
8476#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8477#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8478#[cfg_attr(feature = "ts", derive(TS))]
8479#[cfg_attr(feature = "ts", ts(export))]
8480pub struct ATT_POS_MOCAP_DATA {
8481    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
8482    pub time_usec: u64,
8483    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
8484    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8485    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8486    pub q: [f32; 4],
8487    #[doc = "X position (NED)"]
8488    pub x: f32,
8489    #[doc = "Y position (NED)"]
8490    pub y: f32,
8491    #[doc = "Z position (NED)"]
8492    pub z: f32,
8493    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
8494    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8495    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8496    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8497    pub covariance: [f32; 21],
8498}
8499impl ATT_POS_MOCAP_DATA {
8500    pub const ENCODED_LEN: usize = 120usize;
8501    pub const DEFAULT: Self = Self {
8502        time_usec: 0_u64,
8503        q: [0.0_f32; 4usize],
8504        x: 0.0_f32,
8505        y: 0.0_f32,
8506        z: 0.0_f32,
8507        covariance: [0.0_f32; 21usize],
8508    };
8509    #[cfg(feature = "arbitrary")]
8510    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8511        use arbitrary::{Arbitrary, Unstructured};
8512        let mut buf = [0u8; 1024];
8513        rng.fill_bytes(&mut buf);
8514        let mut unstructured = Unstructured::new(&buf);
8515        Self::arbitrary(&mut unstructured).unwrap_or_default()
8516    }
8517}
8518impl Default for ATT_POS_MOCAP_DATA {
8519    fn default() -> Self {
8520        Self::DEFAULT.clone()
8521    }
8522}
8523impl MessageData for ATT_POS_MOCAP_DATA {
8524    type Message = MavMessage;
8525    const ID: u32 = 138u32;
8526    const NAME: &'static str = "ATT_POS_MOCAP";
8527    const EXTRA_CRC: u8 = 109u8;
8528    const ENCODED_LEN: usize = 120usize;
8529    fn deser(
8530        _version: MavlinkVersion,
8531        __input: &[u8],
8532    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8533        let avail_len = __input.len();
8534        let mut payload_buf = [0; Self::ENCODED_LEN];
8535        let mut buf = if avail_len < Self::ENCODED_LEN {
8536            payload_buf[0..avail_len].copy_from_slice(__input);
8537            Bytes::new(&payload_buf)
8538        } else {
8539            Bytes::new(__input)
8540        };
8541        let mut __struct = Self::default();
8542        __struct.time_usec = buf.get_u64_le()?;
8543        for v in &mut __struct.q {
8544            let val = buf.get_f32_le()?;
8545            *v = val;
8546        }
8547        __struct.x = buf.get_f32_le()?;
8548        __struct.y = buf.get_f32_le()?;
8549        __struct.z = buf.get_f32_le()?;
8550        for v in &mut __struct.covariance {
8551            let val = buf.get_f32_le()?;
8552            *v = val;
8553        }
8554        Ok(__struct)
8555    }
8556    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8557        let mut __tmp = BytesMut::new(bytes);
8558        #[allow(clippy::absurd_extreme_comparisons)]
8559        #[allow(unused_comparisons)]
8560        if __tmp.remaining() < Self::ENCODED_LEN {
8561            panic!(
8562                "buffer is too small (need {} bytes, but got {})",
8563                Self::ENCODED_LEN,
8564                __tmp.remaining(),
8565            )
8566        }
8567        __tmp.put_u64_le(self.time_usec);
8568        for val in &self.q {
8569            __tmp.put_f32_le(*val);
8570        }
8571        __tmp.put_f32_le(self.x);
8572        __tmp.put_f32_le(self.y);
8573        __tmp.put_f32_le(self.z);
8574        if matches!(version, MavlinkVersion::V2) {
8575            for val in &self.covariance {
8576                __tmp.put_f32_le(*val);
8577            }
8578            let len = __tmp.len();
8579            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8580        } else {
8581            __tmp.len()
8582        }
8583    }
8584}
8585#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
8586#[doc = ""]
8587#[doc = "ID: 7"]
8588#[derive(Debug, Clone, PartialEq)]
8589#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8590#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8591#[cfg_attr(feature = "ts", derive(TS))]
8592#[cfg_attr(feature = "ts", ts(export))]
8593pub struct AUTH_KEY_DATA {
8594    #[doc = "key"]
8595    #[cfg_attr(feature = "ts", ts(type = "string"))]
8596    pub key: CharArray<32>,
8597}
8598impl AUTH_KEY_DATA {
8599    pub const ENCODED_LEN: usize = 32usize;
8600    pub const DEFAULT: Self = Self {
8601        key: CharArray::new([0_u8; 32usize]),
8602    };
8603    #[cfg(feature = "arbitrary")]
8604    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8605        use arbitrary::{Arbitrary, Unstructured};
8606        let mut buf = [0u8; 1024];
8607        rng.fill_bytes(&mut buf);
8608        let mut unstructured = Unstructured::new(&buf);
8609        Self::arbitrary(&mut unstructured).unwrap_or_default()
8610    }
8611}
8612impl Default for AUTH_KEY_DATA {
8613    fn default() -> Self {
8614        Self::DEFAULT.clone()
8615    }
8616}
8617impl MessageData for AUTH_KEY_DATA {
8618    type Message = MavMessage;
8619    const ID: u32 = 7u32;
8620    const NAME: &'static str = "AUTH_KEY";
8621    const EXTRA_CRC: u8 = 119u8;
8622    const ENCODED_LEN: usize = 32usize;
8623    fn deser(
8624        _version: MavlinkVersion,
8625        __input: &[u8],
8626    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8627        let avail_len = __input.len();
8628        let mut payload_buf = [0; Self::ENCODED_LEN];
8629        let mut buf = if avail_len < Self::ENCODED_LEN {
8630            payload_buf[0..avail_len].copy_from_slice(__input);
8631            Bytes::new(&payload_buf)
8632        } else {
8633            Bytes::new(__input)
8634        };
8635        let mut __struct = Self::default();
8636        let mut tmp = [0_u8; 32usize];
8637        for v in &mut tmp {
8638            *v = buf.get_u8()?;
8639        }
8640        __struct.key = CharArray::new(tmp);
8641        Ok(__struct)
8642    }
8643    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8644        let mut __tmp = BytesMut::new(bytes);
8645        #[allow(clippy::absurd_extreme_comparisons)]
8646        #[allow(unused_comparisons)]
8647        if __tmp.remaining() < Self::ENCODED_LEN {
8648            panic!(
8649                "buffer is too small (need {} bytes, but got {})",
8650                Self::ENCODED_LEN,
8651                __tmp.remaining(),
8652            )
8653        }
8654        for val in &self.key {
8655            __tmp.put_u8(*val);
8656        }
8657        if matches!(version, MavlinkVersion::V2) {
8658            let len = __tmp.len();
8659            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8660        } else {
8661            __tmp.len()
8662        }
8663    }
8664}
8665#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
8666#[doc = ""]
8667#[doc = "ID: 286"]
8668#[derive(Debug, Clone, PartialEq)]
8669#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8670#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8671#[cfg_attr(feature = "ts", derive(TS))]
8672#[cfg_attr(feature = "ts", ts(export))]
8673pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
8674    #[doc = "Timestamp (time since system boot)."]
8675    pub time_boot_us: u64,
8676    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
8677    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8678    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8679    pub q: [f32; 4],
8680    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
8681    pub q_estimated_delay_us: u32,
8682    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
8683    pub vx: f32,
8684    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
8685    pub vy: f32,
8686    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
8687    pub vz: f32,
8688    #[doc = "Estimated delay of the speed data. 0 if unknown."]
8689    pub v_estimated_delay_us: u32,
8690    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
8691    pub feed_forward_angular_velocity_z: f32,
8692    #[doc = "Bitmap indicating which estimator outputs are valid."]
8693    pub estimator_status: EstimatorStatusFlags,
8694    #[doc = "System ID"]
8695    pub target_system: u8,
8696    #[doc = "Component ID"]
8697    pub target_component: u8,
8698    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
8699    pub landed_state: MavLandedState,
8700    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
8701    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8702    pub angular_velocity_z: f32,
8703}
8704impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
8705    pub const ENCODED_LEN: usize = 57usize;
8706    pub const DEFAULT: Self = Self {
8707        time_boot_us: 0_u64,
8708        q: [0.0_f32; 4usize],
8709        q_estimated_delay_us: 0_u32,
8710        vx: 0.0_f32,
8711        vy: 0.0_f32,
8712        vz: 0.0_f32,
8713        v_estimated_delay_us: 0_u32,
8714        feed_forward_angular_velocity_z: 0.0_f32,
8715        estimator_status: EstimatorStatusFlags::DEFAULT,
8716        target_system: 0_u8,
8717        target_component: 0_u8,
8718        landed_state: MavLandedState::DEFAULT,
8719        angular_velocity_z: 0.0_f32,
8720    };
8721    #[cfg(feature = "arbitrary")]
8722    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8723        use arbitrary::{Arbitrary, Unstructured};
8724        let mut buf = [0u8; 1024];
8725        rng.fill_bytes(&mut buf);
8726        let mut unstructured = Unstructured::new(&buf);
8727        Self::arbitrary(&mut unstructured).unwrap_or_default()
8728    }
8729}
8730impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
8731    fn default() -> Self {
8732        Self::DEFAULT.clone()
8733    }
8734}
8735impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
8736    type Message = MavMessage;
8737    const ID: u32 = 286u32;
8738    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
8739    const EXTRA_CRC: u8 = 210u8;
8740    const ENCODED_LEN: usize = 57usize;
8741    fn deser(
8742        _version: MavlinkVersion,
8743        __input: &[u8],
8744    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8745        let avail_len = __input.len();
8746        let mut payload_buf = [0; Self::ENCODED_LEN];
8747        let mut buf = if avail_len < Self::ENCODED_LEN {
8748            payload_buf[0..avail_len].copy_from_slice(__input);
8749            Bytes::new(&payload_buf)
8750        } else {
8751            Bytes::new(__input)
8752        };
8753        let mut __struct = Self::default();
8754        __struct.time_boot_us = buf.get_u64_le()?;
8755        for v in &mut __struct.q {
8756            let val = buf.get_f32_le()?;
8757            *v = val;
8758        }
8759        __struct.q_estimated_delay_us = buf.get_u32_le()?;
8760        __struct.vx = buf.get_f32_le()?;
8761        __struct.vy = buf.get_f32_le()?;
8762        __struct.vz = buf.get_f32_le()?;
8763        __struct.v_estimated_delay_us = buf.get_u32_le()?;
8764        __struct.feed_forward_angular_velocity_z = buf.get_f32_le()?;
8765        let tmp = buf.get_u16_le()?;
8766        __struct.estimator_status = EstimatorStatusFlags::from_bits(
8767            tmp as <EstimatorStatusFlags as Flags>::Bits,
8768        )
8769        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
8770            flag_type: "EstimatorStatusFlags",
8771            value: tmp as u64,
8772        })?;
8773        __struct.target_system = buf.get_u8()?;
8774        __struct.target_component = buf.get_u8()?;
8775        let tmp = buf.get_u8()?;
8776        __struct.landed_state =
8777            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8778                enum_type: "MavLandedState",
8779                value: tmp as u64,
8780            })?;
8781        __struct.angular_velocity_z = buf.get_f32_le()?;
8782        Ok(__struct)
8783    }
8784    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8785        let mut __tmp = BytesMut::new(bytes);
8786        #[allow(clippy::absurd_extreme_comparisons)]
8787        #[allow(unused_comparisons)]
8788        if __tmp.remaining() < Self::ENCODED_LEN {
8789            panic!(
8790                "buffer is too small (need {} bytes, but got {})",
8791                Self::ENCODED_LEN,
8792                __tmp.remaining(),
8793            )
8794        }
8795        __tmp.put_u64_le(self.time_boot_us);
8796        for val in &self.q {
8797            __tmp.put_f32_le(*val);
8798        }
8799        __tmp.put_u32_le(self.q_estimated_delay_us);
8800        __tmp.put_f32_le(self.vx);
8801        __tmp.put_f32_le(self.vy);
8802        __tmp.put_f32_le(self.vz);
8803        __tmp.put_u32_le(self.v_estimated_delay_us);
8804        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
8805        __tmp.put_u16_le(self.estimator_status.bits() as u16);
8806        __tmp.put_u8(self.target_system);
8807        __tmp.put_u8(self.target_component);
8808        __tmp.put_u8(self.landed_state as u8);
8809        if matches!(version, MavlinkVersion::V2) {
8810            __tmp.put_f32_le(self.angular_velocity_z);
8811            let len = __tmp.len();
8812            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8813        } else {
8814            __tmp.len()
8815        }
8816    }
8817}
8818#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
8819#[doc = ""]
8820#[doc = "ID: 148"]
8821#[derive(Debug, Clone, PartialEq)]
8822#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8823#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8824#[cfg_attr(feature = "ts", derive(TS))]
8825#[cfg_attr(feature = "ts", ts(export))]
8826pub struct AUTOPILOT_VERSION_DATA {
8827    #[doc = "Bitmap of capabilities"]
8828    pub capabilities: MavProtocolCapability,
8829    #[doc = "UID if provided by hardware (see uid2)"]
8830    pub uid: u64,
8831    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
8832    pub flight_sw_version: u32,
8833    #[doc = "Middleware version number"]
8834    pub middleware_sw_version: u32,
8835    #[doc = "Operating system version number"]
8836    pub os_sw_version: u32,
8837    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
8838    pub board_version: u32,
8839    #[doc = "ID of the board vendor"]
8840    pub vendor_id: u16,
8841    #[doc = "ID of the product"]
8842    pub product_id: u16,
8843    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
8844    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8845    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8846    pub flight_custom_version: [u8; 8],
8847    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
8848    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8849    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8850    pub middleware_custom_version: [u8; 8],
8851    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
8852    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8853    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8854    pub os_custom_version: [u8; 8],
8855    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
8856    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8857    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8858    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8859    pub uid2: [u8; 18],
8860}
8861impl AUTOPILOT_VERSION_DATA {
8862    pub const ENCODED_LEN: usize = 78usize;
8863    pub const DEFAULT: Self = Self {
8864        capabilities: MavProtocolCapability::DEFAULT,
8865        uid: 0_u64,
8866        flight_sw_version: 0_u32,
8867        middleware_sw_version: 0_u32,
8868        os_sw_version: 0_u32,
8869        board_version: 0_u32,
8870        vendor_id: 0_u16,
8871        product_id: 0_u16,
8872        flight_custom_version: [0_u8; 8usize],
8873        middleware_custom_version: [0_u8; 8usize],
8874        os_custom_version: [0_u8; 8usize],
8875        uid2: [0_u8; 18usize],
8876    };
8877    #[cfg(feature = "arbitrary")]
8878    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8879        use arbitrary::{Arbitrary, Unstructured};
8880        let mut buf = [0u8; 1024];
8881        rng.fill_bytes(&mut buf);
8882        let mut unstructured = Unstructured::new(&buf);
8883        Self::arbitrary(&mut unstructured).unwrap_or_default()
8884    }
8885}
8886impl Default for AUTOPILOT_VERSION_DATA {
8887    fn default() -> Self {
8888        Self::DEFAULT.clone()
8889    }
8890}
8891impl MessageData for AUTOPILOT_VERSION_DATA {
8892    type Message = MavMessage;
8893    const ID: u32 = 148u32;
8894    const NAME: &'static str = "AUTOPILOT_VERSION";
8895    const EXTRA_CRC: u8 = 178u8;
8896    const ENCODED_LEN: usize = 78usize;
8897    fn deser(
8898        _version: MavlinkVersion,
8899        __input: &[u8],
8900    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8901        let avail_len = __input.len();
8902        let mut payload_buf = [0; Self::ENCODED_LEN];
8903        let mut buf = if avail_len < Self::ENCODED_LEN {
8904            payload_buf[0..avail_len].copy_from_slice(__input);
8905            Bytes::new(&payload_buf)
8906        } else {
8907            Bytes::new(__input)
8908        };
8909        let mut __struct = Self::default();
8910        let tmp = buf.get_u64_le()?;
8911        __struct.capabilities = MavProtocolCapability::from_bits(
8912            tmp as <MavProtocolCapability as Flags>::Bits,
8913        )
8914        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
8915            flag_type: "MavProtocolCapability",
8916            value: tmp as u64,
8917        })?;
8918        __struct.uid = buf.get_u64_le()?;
8919        __struct.flight_sw_version = buf.get_u32_le()?;
8920        __struct.middleware_sw_version = buf.get_u32_le()?;
8921        __struct.os_sw_version = buf.get_u32_le()?;
8922        __struct.board_version = buf.get_u32_le()?;
8923        __struct.vendor_id = buf.get_u16_le()?;
8924        __struct.product_id = buf.get_u16_le()?;
8925        for v in &mut __struct.flight_custom_version {
8926            let val = buf.get_u8()?;
8927            *v = val;
8928        }
8929        for v in &mut __struct.middleware_custom_version {
8930            let val = buf.get_u8()?;
8931            *v = val;
8932        }
8933        for v in &mut __struct.os_custom_version {
8934            let val = buf.get_u8()?;
8935            *v = val;
8936        }
8937        for v in &mut __struct.uid2 {
8938            let val = buf.get_u8()?;
8939            *v = val;
8940        }
8941        Ok(__struct)
8942    }
8943    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8944        let mut __tmp = BytesMut::new(bytes);
8945        #[allow(clippy::absurd_extreme_comparisons)]
8946        #[allow(unused_comparisons)]
8947        if __tmp.remaining() < Self::ENCODED_LEN {
8948            panic!(
8949                "buffer is too small (need {} bytes, but got {})",
8950                Self::ENCODED_LEN,
8951                __tmp.remaining(),
8952            )
8953        }
8954        __tmp.put_u64_le(self.capabilities.bits() as u64);
8955        __tmp.put_u64_le(self.uid);
8956        __tmp.put_u32_le(self.flight_sw_version);
8957        __tmp.put_u32_le(self.middleware_sw_version);
8958        __tmp.put_u32_le(self.os_sw_version);
8959        __tmp.put_u32_le(self.board_version);
8960        __tmp.put_u16_le(self.vendor_id);
8961        __tmp.put_u16_le(self.product_id);
8962        for val in &self.flight_custom_version {
8963            __tmp.put_u8(*val);
8964        }
8965        for val in &self.middleware_custom_version {
8966            __tmp.put_u8(*val);
8967        }
8968        for val in &self.os_custom_version {
8969            __tmp.put_u8(*val);
8970        }
8971        if matches!(version, MavlinkVersion::V2) {
8972            for val in &self.uid2 {
8973                __tmp.put_u8(*val);
8974            }
8975            let len = __tmp.len();
8976            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8977        } else {
8978            __tmp.len()
8979        }
8980    }
8981}
8982#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
8983#[doc = ""]
8984#[doc = "ID: 435"]
8985#[derive(Debug, Clone, PartialEq)]
8986#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8987#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8988#[cfg_attr(feature = "ts", derive(TS))]
8989#[cfg_attr(feature = "ts", ts(export))]
8990pub struct AVAILABLE_MODES_DATA {
8991    #[doc = "A bitfield for use for autopilot-specific flags"]
8992    pub custom_mode: u32,
8993    #[doc = "Mode properties."]
8994    pub properties: MavModeProperty,
8995    #[doc = "The total number of available modes for the current vehicle type."]
8996    pub number_modes: u8,
8997    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
8998    pub mode_index: u8,
8999    #[doc = "Standard mode."]
9000    pub standard_mode: MavStandardMode,
9001    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
9002    #[cfg_attr(feature = "ts", ts(type = "string"))]
9003    pub mode_name: CharArray<35>,
9004}
9005impl AVAILABLE_MODES_DATA {
9006    pub const ENCODED_LEN: usize = 46usize;
9007    pub const DEFAULT: Self = Self {
9008        custom_mode: 0_u32,
9009        properties: MavModeProperty::DEFAULT,
9010        number_modes: 0_u8,
9011        mode_index: 0_u8,
9012        standard_mode: MavStandardMode::DEFAULT,
9013        mode_name: CharArray::new([0_u8; 35usize]),
9014    };
9015    #[cfg(feature = "arbitrary")]
9016    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9017        use arbitrary::{Arbitrary, Unstructured};
9018        let mut buf = [0u8; 1024];
9019        rng.fill_bytes(&mut buf);
9020        let mut unstructured = Unstructured::new(&buf);
9021        Self::arbitrary(&mut unstructured).unwrap_or_default()
9022    }
9023}
9024impl Default for AVAILABLE_MODES_DATA {
9025    fn default() -> Self {
9026        Self::DEFAULT.clone()
9027    }
9028}
9029impl MessageData for AVAILABLE_MODES_DATA {
9030    type Message = MavMessage;
9031    const ID: u32 = 435u32;
9032    const NAME: &'static str = "AVAILABLE_MODES";
9033    const EXTRA_CRC: u8 = 134u8;
9034    const ENCODED_LEN: usize = 46usize;
9035    fn deser(
9036        _version: MavlinkVersion,
9037        __input: &[u8],
9038    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9039        let avail_len = __input.len();
9040        let mut payload_buf = [0; Self::ENCODED_LEN];
9041        let mut buf = if avail_len < Self::ENCODED_LEN {
9042            payload_buf[0..avail_len].copy_from_slice(__input);
9043            Bytes::new(&payload_buf)
9044        } else {
9045            Bytes::new(__input)
9046        };
9047        let mut __struct = Self::default();
9048        __struct.custom_mode = buf.get_u32_le()?;
9049        let tmp = buf.get_u32_le()?;
9050        __struct.properties = MavModeProperty::from_bits(tmp as <MavModeProperty as Flags>::Bits)
9051            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
9052            flag_type: "MavModeProperty",
9053            value: tmp as u64,
9054        })?;
9055        __struct.number_modes = buf.get_u8()?;
9056        __struct.mode_index = buf.get_u8()?;
9057        let tmp = buf.get_u8()?;
9058        __struct.standard_mode =
9059            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9060                enum_type: "MavStandardMode",
9061                value: tmp as u64,
9062            })?;
9063        let mut tmp = [0_u8; 35usize];
9064        for v in &mut tmp {
9065            *v = buf.get_u8()?;
9066        }
9067        __struct.mode_name = CharArray::new(tmp);
9068        Ok(__struct)
9069    }
9070    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9071        let mut __tmp = BytesMut::new(bytes);
9072        #[allow(clippy::absurd_extreme_comparisons)]
9073        #[allow(unused_comparisons)]
9074        if __tmp.remaining() < Self::ENCODED_LEN {
9075            panic!(
9076                "buffer is too small (need {} bytes, but got {})",
9077                Self::ENCODED_LEN,
9078                __tmp.remaining(),
9079            )
9080        }
9081        __tmp.put_u32_le(self.custom_mode);
9082        __tmp.put_u32_le(self.properties.bits() as u32);
9083        __tmp.put_u8(self.number_modes);
9084        __tmp.put_u8(self.mode_index);
9085        __tmp.put_u8(self.standard_mode as u8);
9086        for val in &self.mode_name {
9087            __tmp.put_u8(*val);
9088        }
9089        if matches!(version, MavlinkVersion::V2) {
9090            let len = __tmp.len();
9091            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9092        } else {
9093            __tmp.len()
9094        }
9095    }
9096}
9097#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
9098#[doc = ""]
9099#[doc = "ID: 437"]
9100#[derive(Debug, Clone, PartialEq)]
9101#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9102#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9103#[cfg_attr(feature = "ts", derive(TS))]
9104#[cfg_attr(feature = "ts", ts(export))]
9105pub struct AVAILABLE_MODES_MONITOR_DATA {
9106    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
9107    pub seq: u8,
9108}
9109impl AVAILABLE_MODES_MONITOR_DATA {
9110    pub const ENCODED_LEN: usize = 1usize;
9111    pub const DEFAULT: Self = Self { seq: 0_u8 };
9112    #[cfg(feature = "arbitrary")]
9113    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9114        use arbitrary::{Arbitrary, Unstructured};
9115        let mut buf = [0u8; 1024];
9116        rng.fill_bytes(&mut buf);
9117        let mut unstructured = Unstructured::new(&buf);
9118        Self::arbitrary(&mut unstructured).unwrap_or_default()
9119    }
9120}
9121impl Default for AVAILABLE_MODES_MONITOR_DATA {
9122    fn default() -> Self {
9123        Self::DEFAULT.clone()
9124    }
9125}
9126impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
9127    type Message = MavMessage;
9128    const ID: u32 = 437u32;
9129    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
9130    const EXTRA_CRC: u8 = 30u8;
9131    const ENCODED_LEN: usize = 1usize;
9132    fn deser(
9133        _version: MavlinkVersion,
9134        __input: &[u8],
9135    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9136        let avail_len = __input.len();
9137        let mut payload_buf = [0; Self::ENCODED_LEN];
9138        let mut buf = if avail_len < Self::ENCODED_LEN {
9139            payload_buf[0..avail_len].copy_from_slice(__input);
9140            Bytes::new(&payload_buf)
9141        } else {
9142            Bytes::new(__input)
9143        };
9144        let mut __struct = Self::default();
9145        __struct.seq = buf.get_u8()?;
9146        Ok(__struct)
9147    }
9148    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9149        let mut __tmp = BytesMut::new(bytes);
9150        #[allow(clippy::absurd_extreme_comparisons)]
9151        #[allow(unused_comparisons)]
9152        if __tmp.remaining() < Self::ENCODED_LEN {
9153            panic!(
9154                "buffer is too small (need {} bytes, but got {})",
9155                Self::ENCODED_LEN,
9156                __tmp.remaining(),
9157            )
9158        }
9159        __tmp.put_u8(self.seq);
9160        if matches!(version, MavlinkVersion::V2) {
9161            let len = __tmp.len();
9162            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9163        } else {
9164            __tmp.len()
9165        }
9166    }
9167}
9168#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
9169#[doc = ""]
9170#[doc = "ID: 372"]
9171#[derive(Debug, Clone, PartialEq)]
9172#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9173#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9174#[cfg_attr(feature = "ts", derive(TS))]
9175#[cfg_attr(feature = "ts", ts(export))]
9176pub struct BATTERY_INFO_DATA {
9177    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
9178    pub discharge_minimum_voltage: f32,
9179    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
9180    pub charging_minimum_voltage: f32,
9181    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
9182    pub resting_minimum_voltage: f32,
9183    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
9184    pub charging_maximum_voltage: f32,
9185    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
9186    pub charging_maximum_current: f32,
9187    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
9188    pub nominal_voltage: f32,
9189    #[doc = "Maximum pack discharge current. 0: field not provided."]
9190    pub discharge_maximum_current: f32,
9191    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
9192    pub discharge_maximum_burst_current: f32,
9193    #[doc = "Fully charged design capacity. 0: field not provided."]
9194    pub design_capacity: f32,
9195    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
9196    pub full_charge_capacity: f32,
9197    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
9198    pub cycle_count: u16,
9199    #[doc = "Battery weight. 0: field not provided."]
9200    pub weight: u16,
9201    #[doc = "Battery ID"]
9202    pub id: u8,
9203    #[doc = "Function of the battery."]
9204    pub battery_function: MavBatteryFunction,
9205    #[doc = "Type (chemistry) of the battery."]
9206    pub mavtype: MavBatteryType,
9207    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
9208    pub state_of_health: u8,
9209    #[doc = "Number of battery cells in series. 0: field not provided."]
9210    pub cells_in_series: u8,
9211    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
9212    #[cfg_attr(feature = "ts", ts(type = "string"))]
9213    pub manufacture_date: CharArray<9>,
9214    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
9215    #[cfg_attr(feature = "ts", ts(type = "string"))]
9216    pub serial_number: CharArray<32>,
9217    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
9218    #[cfg_attr(feature = "ts", ts(type = "string"))]
9219    pub name: CharArray<50>,
9220}
9221impl BATTERY_INFO_DATA {
9222    pub const ENCODED_LEN: usize = 140usize;
9223    pub const DEFAULT: Self = Self {
9224        discharge_minimum_voltage: 0.0_f32,
9225        charging_minimum_voltage: 0.0_f32,
9226        resting_minimum_voltage: 0.0_f32,
9227        charging_maximum_voltage: 0.0_f32,
9228        charging_maximum_current: 0.0_f32,
9229        nominal_voltage: 0.0_f32,
9230        discharge_maximum_current: 0.0_f32,
9231        discharge_maximum_burst_current: 0.0_f32,
9232        design_capacity: 0.0_f32,
9233        full_charge_capacity: 0.0_f32,
9234        cycle_count: 0_u16,
9235        weight: 0_u16,
9236        id: 0_u8,
9237        battery_function: MavBatteryFunction::DEFAULT,
9238        mavtype: MavBatteryType::DEFAULT,
9239        state_of_health: 0_u8,
9240        cells_in_series: 0_u8,
9241        manufacture_date: CharArray::new([0_u8; 9usize]),
9242        serial_number: CharArray::new([0_u8; 32usize]),
9243        name: CharArray::new([0_u8; 50usize]),
9244    };
9245    #[cfg(feature = "arbitrary")]
9246    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9247        use arbitrary::{Arbitrary, Unstructured};
9248        let mut buf = [0u8; 1024];
9249        rng.fill_bytes(&mut buf);
9250        let mut unstructured = Unstructured::new(&buf);
9251        Self::arbitrary(&mut unstructured).unwrap_or_default()
9252    }
9253}
9254impl Default for BATTERY_INFO_DATA {
9255    fn default() -> Self {
9256        Self::DEFAULT.clone()
9257    }
9258}
9259impl MessageData for BATTERY_INFO_DATA {
9260    type Message = MavMessage;
9261    const ID: u32 = 372u32;
9262    const NAME: &'static str = "BATTERY_INFO";
9263    const EXTRA_CRC: u8 = 26u8;
9264    const ENCODED_LEN: usize = 140usize;
9265    fn deser(
9266        _version: MavlinkVersion,
9267        __input: &[u8],
9268    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9269        let avail_len = __input.len();
9270        let mut payload_buf = [0; Self::ENCODED_LEN];
9271        let mut buf = if avail_len < Self::ENCODED_LEN {
9272            payload_buf[0..avail_len].copy_from_slice(__input);
9273            Bytes::new(&payload_buf)
9274        } else {
9275            Bytes::new(__input)
9276        };
9277        let mut __struct = Self::default();
9278        __struct.discharge_minimum_voltage = buf.get_f32_le()?;
9279        __struct.charging_minimum_voltage = buf.get_f32_le()?;
9280        __struct.resting_minimum_voltage = buf.get_f32_le()?;
9281        __struct.charging_maximum_voltage = buf.get_f32_le()?;
9282        __struct.charging_maximum_current = buf.get_f32_le()?;
9283        __struct.nominal_voltage = buf.get_f32_le()?;
9284        __struct.discharge_maximum_current = buf.get_f32_le()?;
9285        __struct.discharge_maximum_burst_current = buf.get_f32_le()?;
9286        __struct.design_capacity = buf.get_f32_le()?;
9287        __struct.full_charge_capacity = buf.get_f32_le()?;
9288        __struct.cycle_count = buf.get_u16_le()?;
9289        __struct.weight = buf.get_u16_le()?;
9290        __struct.id = buf.get_u8()?;
9291        let tmp = buf.get_u8()?;
9292        __struct.battery_function =
9293            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9294                enum_type: "MavBatteryFunction",
9295                value: tmp as u64,
9296            })?;
9297        let tmp = buf.get_u8()?;
9298        __struct.mavtype =
9299            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9300                enum_type: "MavBatteryType",
9301                value: tmp as u64,
9302            })?;
9303        __struct.state_of_health = buf.get_u8()?;
9304        __struct.cells_in_series = buf.get_u8()?;
9305        let mut tmp = [0_u8; 9usize];
9306        for v in &mut tmp {
9307            *v = buf.get_u8()?;
9308        }
9309        __struct.manufacture_date = CharArray::new(tmp);
9310        let mut tmp = [0_u8; 32usize];
9311        for v in &mut tmp {
9312            *v = buf.get_u8()?;
9313        }
9314        __struct.serial_number = CharArray::new(tmp);
9315        let mut tmp = [0_u8; 50usize];
9316        for v in &mut tmp {
9317            *v = buf.get_u8()?;
9318        }
9319        __struct.name = CharArray::new(tmp);
9320        Ok(__struct)
9321    }
9322    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9323        let mut __tmp = BytesMut::new(bytes);
9324        #[allow(clippy::absurd_extreme_comparisons)]
9325        #[allow(unused_comparisons)]
9326        if __tmp.remaining() < Self::ENCODED_LEN {
9327            panic!(
9328                "buffer is too small (need {} bytes, but got {})",
9329                Self::ENCODED_LEN,
9330                __tmp.remaining(),
9331            )
9332        }
9333        __tmp.put_f32_le(self.discharge_minimum_voltage);
9334        __tmp.put_f32_le(self.charging_minimum_voltage);
9335        __tmp.put_f32_le(self.resting_minimum_voltage);
9336        __tmp.put_f32_le(self.charging_maximum_voltage);
9337        __tmp.put_f32_le(self.charging_maximum_current);
9338        __tmp.put_f32_le(self.nominal_voltage);
9339        __tmp.put_f32_le(self.discharge_maximum_current);
9340        __tmp.put_f32_le(self.discharge_maximum_burst_current);
9341        __tmp.put_f32_le(self.design_capacity);
9342        __tmp.put_f32_le(self.full_charge_capacity);
9343        __tmp.put_u16_le(self.cycle_count);
9344        __tmp.put_u16_le(self.weight);
9345        __tmp.put_u8(self.id);
9346        __tmp.put_u8(self.battery_function as u8);
9347        __tmp.put_u8(self.mavtype as u8);
9348        __tmp.put_u8(self.state_of_health);
9349        __tmp.put_u8(self.cells_in_series);
9350        for val in &self.manufacture_date {
9351            __tmp.put_u8(*val);
9352        }
9353        for val in &self.serial_number {
9354            __tmp.put_u8(*val);
9355        }
9356        for val in &self.name {
9357            __tmp.put_u8(*val);
9358        }
9359        if matches!(version, MavlinkVersion::V2) {
9360            let len = __tmp.len();
9361            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9362        } else {
9363            __tmp.len()
9364        }
9365    }
9366}
9367#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
9368#[doc = ""]
9369#[doc = "ID: 147"]
9370#[derive(Debug, Clone, PartialEq)]
9371#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9372#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9373#[cfg_attr(feature = "ts", derive(TS))]
9374#[cfg_attr(feature = "ts", ts(export))]
9375pub struct BATTERY_STATUS_DATA {
9376    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
9377    pub current_consumed: i32,
9378    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
9379    pub energy_consumed: i32,
9380    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
9381    pub temperature: i16,
9382    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
9383    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9384    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9385    pub voltages: [u16; 10],
9386    #[doc = "Battery current, -1: autopilot does not measure the current"]
9387    pub current_battery: i16,
9388    #[doc = "Battery ID"]
9389    pub id: u8,
9390    #[doc = "Function of the battery"]
9391    pub battery_function: MavBatteryFunction,
9392    #[doc = "Type (chemistry) of the battery"]
9393    pub mavtype: MavBatteryType,
9394    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
9395    pub battery_remaining: i8,
9396    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
9397    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9398    pub time_remaining: i32,
9399    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
9400    #[cfg_attr(feature = "serde", serde(default))]
9401    pub charge_state: MavBatteryChargeState,
9402    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
9403    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9404    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9405    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9406    pub voltages_ext: [u16; 4],
9407    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
9408    #[cfg_attr(feature = "serde", serde(default))]
9409    pub mode: MavBatteryMode,
9410    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
9411    #[cfg_attr(feature = "serde", serde(default))]
9412    pub fault_bitmask: MavBatteryFault,
9413}
9414impl BATTERY_STATUS_DATA {
9415    pub const ENCODED_LEN: usize = 54usize;
9416    pub const DEFAULT: Self = Self {
9417        current_consumed: 0_i32,
9418        energy_consumed: 0_i32,
9419        temperature: 0_i16,
9420        voltages: [0_u16; 10usize],
9421        current_battery: 0_i16,
9422        id: 0_u8,
9423        battery_function: MavBatteryFunction::DEFAULT,
9424        mavtype: MavBatteryType::DEFAULT,
9425        battery_remaining: 0_i8,
9426        time_remaining: 0_i32,
9427        charge_state: MavBatteryChargeState::DEFAULT,
9428        voltages_ext: [0_u16; 4usize],
9429        mode: MavBatteryMode::DEFAULT,
9430        fault_bitmask: MavBatteryFault::DEFAULT,
9431    };
9432    #[cfg(feature = "arbitrary")]
9433    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9434        use arbitrary::{Arbitrary, Unstructured};
9435        let mut buf = [0u8; 1024];
9436        rng.fill_bytes(&mut buf);
9437        let mut unstructured = Unstructured::new(&buf);
9438        Self::arbitrary(&mut unstructured).unwrap_or_default()
9439    }
9440}
9441impl Default for BATTERY_STATUS_DATA {
9442    fn default() -> Self {
9443        Self::DEFAULT.clone()
9444    }
9445}
9446impl MessageData for BATTERY_STATUS_DATA {
9447    type Message = MavMessage;
9448    const ID: u32 = 147u32;
9449    const NAME: &'static str = "BATTERY_STATUS";
9450    const EXTRA_CRC: u8 = 154u8;
9451    const ENCODED_LEN: usize = 54usize;
9452    fn deser(
9453        _version: MavlinkVersion,
9454        __input: &[u8],
9455    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9456        let avail_len = __input.len();
9457        let mut payload_buf = [0; Self::ENCODED_LEN];
9458        let mut buf = if avail_len < Self::ENCODED_LEN {
9459            payload_buf[0..avail_len].copy_from_slice(__input);
9460            Bytes::new(&payload_buf)
9461        } else {
9462            Bytes::new(__input)
9463        };
9464        let mut __struct = Self::default();
9465        __struct.current_consumed = buf.get_i32_le()?;
9466        __struct.energy_consumed = buf.get_i32_le()?;
9467        __struct.temperature = buf.get_i16_le()?;
9468        for v in &mut __struct.voltages {
9469            let val = buf.get_u16_le()?;
9470            *v = val;
9471        }
9472        __struct.current_battery = buf.get_i16_le()?;
9473        __struct.id = buf.get_u8()?;
9474        let tmp = buf.get_u8()?;
9475        __struct.battery_function =
9476            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9477                enum_type: "MavBatteryFunction",
9478                value: tmp as u64,
9479            })?;
9480        let tmp = buf.get_u8()?;
9481        __struct.mavtype =
9482            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9483                enum_type: "MavBatteryType",
9484                value: tmp as u64,
9485            })?;
9486        __struct.battery_remaining = buf.get_i8()?;
9487        __struct.time_remaining = buf.get_i32_le()?;
9488        let tmp = buf.get_u8()?;
9489        __struct.charge_state =
9490            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9491                enum_type: "MavBatteryChargeState",
9492                value: tmp as u64,
9493            })?;
9494        for v in &mut __struct.voltages_ext {
9495            let val = buf.get_u16_le()?;
9496            *v = val;
9497        }
9498        let tmp = buf.get_u8()?;
9499        __struct.mode =
9500            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9501                enum_type: "MavBatteryMode",
9502                value: tmp as u64,
9503            })?;
9504        let tmp = buf.get_u32_le()?;
9505        __struct.fault_bitmask = MavBatteryFault::from_bits(
9506            tmp as <MavBatteryFault as Flags>::Bits,
9507        )
9508        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
9509            flag_type: "MavBatteryFault",
9510            value: tmp as u64,
9511        })?;
9512        Ok(__struct)
9513    }
9514    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9515        let mut __tmp = BytesMut::new(bytes);
9516        #[allow(clippy::absurd_extreme_comparisons)]
9517        #[allow(unused_comparisons)]
9518        if __tmp.remaining() < Self::ENCODED_LEN {
9519            panic!(
9520                "buffer is too small (need {} bytes, but got {})",
9521                Self::ENCODED_LEN,
9522                __tmp.remaining(),
9523            )
9524        }
9525        __tmp.put_i32_le(self.current_consumed);
9526        __tmp.put_i32_le(self.energy_consumed);
9527        __tmp.put_i16_le(self.temperature);
9528        for val in &self.voltages {
9529            __tmp.put_u16_le(*val);
9530        }
9531        __tmp.put_i16_le(self.current_battery);
9532        __tmp.put_u8(self.id);
9533        __tmp.put_u8(self.battery_function as u8);
9534        __tmp.put_u8(self.mavtype as u8);
9535        __tmp.put_i8(self.battery_remaining);
9536        if matches!(version, MavlinkVersion::V2) {
9537            __tmp.put_i32_le(self.time_remaining);
9538            __tmp.put_u8(self.charge_state as u8);
9539            for val in &self.voltages_ext {
9540                __tmp.put_u16_le(*val);
9541            }
9542            __tmp.put_u8(self.mode as u8);
9543            __tmp.put_u32_le(self.fault_bitmask.bits() as u32);
9544            let len = __tmp.len();
9545            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9546        } else {
9547            __tmp.len()
9548        }
9549    }
9550}
9551#[doc = "Report button state change."]
9552#[doc = ""]
9553#[doc = "ID: 257"]
9554#[derive(Debug, Clone, PartialEq)]
9555#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9556#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9557#[cfg_attr(feature = "ts", derive(TS))]
9558#[cfg_attr(feature = "ts", ts(export))]
9559pub struct BUTTON_CHANGE_DATA {
9560    #[doc = "Timestamp (time since system boot)."]
9561    pub time_boot_ms: u32,
9562    #[doc = "Time of last change of button state."]
9563    pub last_change_ms: u32,
9564    #[doc = "Bitmap for state of buttons."]
9565    pub state: u8,
9566}
9567impl BUTTON_CHANGE_DATA {
9568    pub const ENCODED_LEN: usize = 9usize;
9569    pub const DEFAULT: Self = Self {
9570        time_boot_ms: 0_u32,
9571        last_change_ms: 0_u32,
9572        state: 0_u8,
9573    };
9574    #[cfg(feature = "arbitrary")]
9575    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9576        use arbitrary::{Arbitrary, Unstructured};
9577        let mut buf = [0u8; 1024];
9578        rng.fill_bytes(&mut buf);
9579        let mut unstructured = Unstructured::new(&buf);
9580        Self::arbitrary(&mut unstructured).unwrap_or_default()
9581    }
9582}
9583impl Default for BUTTON_CHANGE_DATA {
9584    fn default() -> Self {
9585        Self::DEFAULT.clone()
9586    }
9587}
9588impl MessageData for BUTTON_CHANGE_DATA {
9589    type Message = MavMessage;
9590    const ID: u32 = 257u32;
9591    const NAME: &'static str = "BUTTON_CHANGE";
9592    const EXTRA_CRC: u8 = 131u8;
9593    const ENCODED_LEN: usize = 9usize;
9594    fn deser(
9595        _version: MavlinkVersion,
9596        __input: &[u8],
9597    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9598        let avail_len = __input.len();
9599        let mut payload_buf = [0; Self::ENCODED_LEN];
9600        let mut buf = if avail_len < Self::ENCODED_LEN {
9601            payload_buf[0..avail_len].copy_from_slice(__input);
9602            Bytes::new(&payload_buf)
9603        } else {
9604            Bytes::new(__input)
9605        };
9606        let mut __struct = Self::default();
9607        __struct.time_boot_ms = buf.get_u32_le()?;
9608        __struct.last_change_ms = buf.get_u32_le()?;
9609        __struct.state = buf.get_u8()?;
9610        Ok(__struct)
9611    }
9612    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9613        let mut __tmp = BytesMut::new(bytes);
9614        #[allow(clippy::absurd_extreme_comparisons)]
9615        #[allow(unused_comparisons)]
9616        if __tmp.remaining() < Self::ENCODED_LEN {
9617            panic!(
9618                "buffer is too small (need {} bytes, but got {})",
9619                Self::ENCODED_LEN,
9620                __tmp.remaining(),
9621            )
9622        }
9623        __tmp.put_u32_le(self.time_boot_ms);
9624        __tmp.put_u32_le(self.last_change_ms);
9625        __tmp.put_u8(self.state);
9626        if matches!(version, MavlinkVersion::V2) {
9627            let len = __tmp.len();
9628            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9629        } else {
9630            __tmp.len()
9631        }
9632    }
9633}
9634#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
9635#[doc = ""]
9636#[doc = "ID: 262"]
9637#[derive(Debug, Clone, PartialEq)]
9638#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9639#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9640#[cfg_attr(feature = "ts", derive(TS))]
9641#[cfg_attr(feature = "ts", ts(export))]
9642pub struct CAMERA_CAPTURE_STATUS_DATA {
9643    #[doc = "Timestamp (time since system boot)."]
9644    pub time_boot_ms: u32,
9645    #[doc = "Image capture interval"]
9646    pub image_interval: f32,
9647    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
9648    pub recording_time_ms: u32,
9649    #[doc = "Available storage capacity."]
9650    pub available_capacity: f32,
9651    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
9652    pub image_status: u8,
9653    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
9654    pub video_status: u8,
9655    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
9656    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9657    pub image_count: i32,
9658    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
9659    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9660    pub camera_device_id: u8,
9661}
9662impl CAMERA_CAPTURE_STATUS_DATA {
9663    pub const ENCODED_LEN: usize = 23usize;
9664    pub const DEFAULT: Self = Self {
9665        time_boot_ms: 0_u32,
9666        image_interval: 0.0_f32,
9667        recording_time_ms: 0_u32,
9668        available_capacity: 0.0_f32,
9669        image_status: 0_u8,
9670        video_status: 0_u8,
9671        image_count: 0_i32,
9672        camera_device_id: 0_u8,
9673    };
9674    #[cfg(feature = "arbitrary")]
9675    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9676        use arbitrary::{Arbitrary, Unstructured};
9677        let mut buf = [0u8; 1024];
9678        rng.fill_bytes(&mut buf);
9679        let mut unstructured = Unstructured::new(&buf);
9680        Self::arbitrary(&mut unstructured).unwrap_or_default()
9681    }
9682}
9683impl Default for CAMERA_CAPTURE_STATUS_DATA {
9684    fn default() -> Self {
9685        Self::DEFAULT.clone()
9686    }
9687}
9688impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
9689    type Message = MavMessage;
9690    const ID: u32 = 262u32;
9691    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
9692    const EXTRA_CRC: u8 = 12u8;
9693    const ENCODED_LEN: usize = 23usize;
9694    fn deser(
9695        _version: MavlinkVersion,
9696        __input: &[u8],
9697    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9698        let avail_len = __input.len();
9699        let mut payload_buf = [0; Self::ENCODED_LEN];
9700        let mut buf = if avail_len < Self::ENCODED_LEN {
9701            payload_buf[0..avail_len].copy_from_slice(__input);
9702            Bytes::new(&payload_buf)
9703        } else {
9704            Bytes::new(__input)
9705        };
9706        let mut __struct = Self::default();
9707        __struct.time_boot_ms = buf.get_u32_le()?;
9708        __struct.image_interval = buf.get_f32_le()?;
9709        __struct.recording_time_ms = buf.get_u32_le()?;
9710        __struct.available_capacity = buf.get_f32_le()?;
9711        __struct.image_status = buf.get_u8()?;
9712        __struct.video_status = buf.get_u8()?;
9713        __struct.image_count = buf.get_i32_le()?;
9714        __struct.camera_device_id = buf.get_u8()?;
9715        Ok(__struct)
9716    }
9717    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9718        let mut __tmp = BytesMut::new(bytes);
9719        #[allow(clippy::absurd_extreme_comparisons)]
9720        #[allow(unused_comparisons)]
9721        if __tmp.remaining() < Self::ENCODED_LEN {
9722            panic!(
9723                "buffer is too small (need {} bytes, but got {})",
9724                Self::ENCODED_LEN,
9725                __tmp.remaining(),
9726            )
9727        }
9728        __tmp.put_u32_le(self.time_boot_ms);
9729        __tmp.put_f32_le(self.image_interval);
9730        __tmp.put_u32_le(self.recording_time_ms);
9731        __tmp.put_f32_le(self.available_capacity);
9732        __tmp.put_u8(self.image_status);
9733        __tmp.put_u8(self.video_status);
9734        if matches!(version, MavlinkVersion::V2) {
9735            __tmp.put_i32_le(self.image_count);
9736            __tmp.put_u8(self.camera_device_id);
9737            let len = __tmp.len();
9738            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9739        } else {
9740            __tmp.len()
9741        }
9742    }
9743}
9744#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
9745#[doc = ""]
9746#[doc = "ID: 271"]
9747#[derive(Debug, Clone, PartialEq)]
9748#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9749#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9750#[cfg_attr(feature = "ts", derive(TS))]
9751#[cfg_attr(feature = "ts", ts(export))]
9752pub struct CAMERA_FOV_STATUS_DATA {
9753    #[doc = "Timestamp (time since system boot)."]
9754    pub time_boot_ms: u32,
9755    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
9756    pub lat_camera: i32,
9757    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
9758    pub lon_camera: i32,
9759    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
9760    pub alt_camera: i32,
9761    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
9762    pub lat_image: i32,
9763    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
9764    pub lon_image: i32,
9765    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
9766    pub alt_image: i32,
9767    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
9768    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9769    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9770    pub q: [f32; 4],
9771    #[doc = "Horizontal field of view (NaN if unknown)."]
9772    pub hfov: f32,
9773    #[doc = "Vertical field of view (NaN if unknown)."]
9774    pub vfov: f32,
9775    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
9776    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9777    pub camera_device_id: u8,
9778}
9779impl CAMERA_FOV_STATUS_DATA {
9780    pub const ENCODED_LEN: usize = 53usize;
9781    pub const DEFAULT: Self = Self {
9782        time_boot_ms: 0_u32,
9783        lat_camera: 0_i32,
9784        lon_camera: 0_i32,
9785        alt_camera: 0_i32,
9786        lat_image: 0_i32,
9787        lon_image: 0_i32,
9788        alt_image: 0_i32,
9789        q: [0.0_f32; 4usize],
9790        hfov: 0.0_f32,
9791        vfov: 0.0_f32,
9792        camera_device_id: 0_u8,
9793    };
9794    #[cfg(feature = "arbitrary")]
9795    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9796        use arbitrary::{Arbitrary, Unstructured};
9797        let mut buf = [0u8; 1024];
9798        rng.fill_bytes(&mut buf);
9799        let mut unstructured = Unstructured::new(&buf);
9800        Self::arbitrary(&mut unstructured).unwrap_or_default()
9801    }
9802}
9803impl Default for CAMERA_FOV_STATUS_DATA {
9804    fn default() -> Self {
9805        Self::DEFAULT.clone()
9806    }
9807}
9808impl MessageData for CAMERA_FOV_STATUS_DATA {
9809    type Message = MavMessage;
9810    const ID: u32 = 271u32;
9811    const NAME: &'static str = "CAMERA_FOV_STATUS";
9812    const EXTRA_CRC: u8 = 22u8;
9813    const ENCODED_LEN: usize = 53usize;
9814    fn deser(
9815        _version: MavlinkVersion,
9816        __input: &[u8],
9817    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9818        let avail_len = __input.len();
9819        let mut payload_buf = [0; Self::ENCODED_LEN];
9820        let mut buf = if avail_len < Self::ENCODED_LEN {
9821            payload_buf[0..avail_len].copy_from_slice(__input);
9822            Bytes::new(&payload_buf)
9823        } else {
9824            Bytes::new(__input)
9825        };
9826        let mut __struct = Self::default();
9827        __struct.time_boot_ms = buf.get_u32_le()?;
9828        __struct.lat_camera = buf.get_i32_le()?;
9829        __struct.lon_camera = buf.get_i32_le()?;
9830        __struct.alt_camera = buf.get_i32_le()?;
9831        __struct.lat_image = buf.get_i32_le()?;
9832        __struct.lon_image = buf.get_i32_le()?;
9833        __struct.alt_image = buf.get_i32_le()?;
9834        for v in &mut __struct.q {
9835            let val = buf.get_f32_le()?;
9836            *v = val;
9837        }
9838        __struct.hfov = buf.get_f32_le()?;
9839        __struct.vfov = buf.get_f32_le()?;
9840        __struct.camera_device_id = buf.get_u8()?;
9841        Ok(__struct)
9842    }
9843    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9844        let mut __tmp = BytesMut::new(bytes);
9845        #[allow(clippy::absurd_extreme_comparisons)]
9846        #[allow(unused_comparisons)]
9847        if __tmp.remaining() < Self::ENCODED_LEN {
9848            panic!(
9849                "buffer is too small (need {} bytes, but got {})",
9850                Self::ENCODED_LEN,
9851                __tmp.remaining(),
9852            )
9853        }
9854        __tmp.put_u32_le(self.time_boot_ms);
9855        __tmp.put_i32_le(self.lat_camera);
9856        __tmp.put_i32_le(self.lon_camera);
9857        __tmp.put_i32_le(self.alt_camera);
9858        __tmp.put_i32_le(self.lat_image);
9859        __tmp.put_i32_le(self.lon_image);
9860        __tmp.put_i32_le(self.alt_image);
9861        for val in &self.q {
9862            __tmp.put_f32_le(*val);
9863        }
9864        __tmp.put_f32_le(self.hfov);
9865        __tmp.put_f32_le(self.vfov);
9866        if matches!(version, MavlinkVersion::V2) {
9867            __tmp.put_u8(self.camera_device_id);
9868            let len = __tmp.len();
9869            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9870        } else {
9871            __tmp.len()
9872        }
9873    }
9874}
9875#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
9876#[doc = ""]
9877#[doc = "ID: 263"]
9878#[derive(Debug, Clone, PartialEq)]
9879#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9880#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9881#[cfg_attr(feature = "ts", derive(TS))]
9882#[cfg_attr(feature = "ts", ts(export))]
9883pub struct CAMERA_IMAGE_CAPTURED_DATA {
9884    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
9885    pub time_utc: u64,
9886    #[doc = "Timestamp (time since system boot)."]
9887    pub time_boot_ms: u32,
9888    #[doc = "Latitude where image was taken"]
9889    pub lat: i32,
9890    #[doc = "Longitude where capture was taken"]
9891    pub lon: i32,
9892    #[doc = "Altitude (MSL) where image was taken"]
9893    pub alt: i32,
9894    #[doc = "Altitude above ground"]
9895    pub relative_alt: i32,
9896    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
9897    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9898    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9899    pub q: [f32; 4],
9900    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
9901    pub image_index: i32,
9902    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
9903    pub camera_id: u8,
9904    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
9905    pub capture_result: i8,
9906    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
9907    #[cfg_attr(feature = "ts", ts(type = "string"))]
9908    pub file_url: CharArray<205>,
9909}
9910impl CAMERA_IMAGE_CAPTURED_DATA {
9911    pub const ENCODED_LEN: usize = 255usize;
9912    pub const DEFAULT: Self = Self {
9913        time_utc: 0_u64,
9914        time_boot_ms: 0_u32,
9915        lat: 0_i32,
9916        lon: 0_i32,
9917        alt: 0_i32,
9918        relative_alt: 0_i32,
9919        q: [0.0_f32; 4usize],
9920        image_index: 0_i32,
9921        camera_id: 0_u8,
9922        capture_result: 0_i8,
9923        file_url: CharArray::new([0_u8; 205usize]),
9924    };
9925    #[cfg(feature = "arbitrary")]
9926    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9927        use arbitrary::{Arbitrary, Unstructured};
9928        let mut buf = [0u8; 1024];
9929        rng.fill_bytes(&mut buf);
9930        let mut unstructured = Unstructured::new(&buf);
9931        Self::arbitrary(&mut unstructured).unwrap_or_default()
9932    }
9933}
9934impl Default for CAMERA_IMAGE_CAPTURED_DATA {
9935    fn default() -> Self {
9936        Self::DEFAULT.clone()
9937    }
9938}
9939impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
9940    type Message = MavMessage;
9941    const ID: u32 = 263u32;
9942    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
9943    const EXTRA_CRC: u8 = 133u8;
9944    const ENCODED_LEN: usize = 255usize;
9945    fn deser(
9946        _version: MavlinkVersion,
9947        __input: &[u8],
9948    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9949        let avail_len = __input.len();
9950        let mut payload_buf = [0; Self::ENCODED_LEN];
9951        let mut buf = if avail_len < Self::ENCODED_LEN {
9952            payload_buf[0..avail_len].copy_from_slice(__input);
9953            Bytes::new(&payload_buf)
9954        } else {
9955            Bytes::new(__input)
9956        };
9957        let mut __struct = Self::default();
9958        __struct.time_utc = buf.get_u64_le()?;
9959        __struct.time_boot_ms = buf.get_u32_le()?;
9960        __struct.lat = buf.get_i32_le()?;
9961        __struct.lon = buf.get_i32_le()?;
9962        __struct.alt = buf.get_i32_le()?;
9963        __struct.relative_alt = buf.get_i32_le()?;
9964        for v in &mut __struct.q {
9965            let val = buf.get_f32_le()?;
9966            *v = val;
9967        }
9968        __struct.image_index = buf.get_i32_le()?;
9969        __struct.camera_id = buf.get_u8()?;
9970        __struct.capture_result = buf.get_i8()?;
9971        let mut tmp = [0_u8; 205usize];
9972        for v in &mut tmp {
9973            *v = buf.get_u8()?;
9974        }
9975        __struct.file_url = CharArray::new(tmp);
9976        Ok(__struct)
9977    }
9978    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9979        let mut __tmp = BytesMut::new(bytes);
9980        #[allow(clippy::absurd_extreme_comparisons)]
9981        #[allow(unused_comparisons)]
9982        if __tmp.remaining() < Self::ENCODED_LEN {
9983            panic!(
9984                "buffer is too small (need {} bytes, but got {})",
9985                Self::ENCODED_LEN,
9986                __tmp.remaining(),
9987            )
9988        }
9989        __tmp.put_u64_le(self.time_utc);
9990        __tmp.put_u32_le(self.time_boot_ms);
9991        __tmp.put_i32_le(self.lat);
9992        __tmp.put_i32_le(self.lon);
9993        __tmp.put_i32_le(self.alt);
9994        __tmp.put_i32_le(self.relative_alt);
9995        for val in &self.q {
9996            __tmp.put_f32_le(*val);
9997        }
9998        __tmp.put_i32_le(self.image_index);
9999        __tmp.put_u8(self.camera_id);
10000        __tmp.put_i8(self.capture_result);
10001        for val in &self.file_url {
10002            __tmp.put_u8(*val);
10003        }
10004        if matches!(version, MavlinkVersion::V2) {
10005            let len = __tmp.len();
10006            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10007        } else {
10008            __tmp.len()
10009        }
10010    }
10011}
10012#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
10013#[doc = ""]
10014#[doc = "ID: 259"]
10015#[derive(Debug, Clone, PartialEq)]
10016#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10017#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10018#[cfg_attr(feature = "ts", derive(TS))]
10019#[cfg_attr(feature = "ts", ts(export))]
10020pub struct CAMERA_INFORMATION_DATA {
10021    #[doc = "Timestamp (time since system boot)."]
10022    pub time_boot_ms: u32,
10023    #[doc = "Version of the camera firmware, encoded as: (Dev&amp;0xff)&lt;&lt;24 | (Patch&amp;0xff)&lt;&lt;16 | (Minor&amp;0xff)&lt;&lt;8 | (Major&amp;0xff). Use 0 if not known."]
10024    pub firmware_version: u32,
10025    #[doc = "Focal length. Use NaN if not known."]
10026    pub focal_length: f32,
10027    #[doc = "Image sensor size horizontal. Use NaN if not known."]
10028    pub sensor_size_h: f32,
10029    #[doc = "Image sensor size vertical. Use NaN if not known."]
10030    pub sensor_size_v: f32,
10031    #[doc = "Bitmap of camera capability flags."]
10032    pub flags: CameraCapFlags,
10033    #[doc = "Horizontal image resolution. Use 0 if not known."]
10034    pub resolution_h: u16,
10035    #[doc = "Vertical image resolution. Use 0 if not known."]
10036    pub resolution_v: u16,
10037    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
10038    pub cam_definition_version: u16,
10039    #[doc = "Name of the camera vendor"]
10040    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10041    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10042    pub vendor_name: [u8; 32],
10043    #[doc = "Name of the camera model"]
10044    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10045    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10046    pub model_name: [u8; 32],
10047    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
10048    pub lens_id: u8,
10049    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
10050    #[cfg_attr(feature = "ts", ts(type = "string"))]
10051    pub cam_definition_uri: CharArray<140>,
10052    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
10053    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10054    pub gimbal_device_id: u8,
10055    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
10056    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10057    pub camera_device_id: u8,
10058}
10059impl CAMERA_INFORMATION_DATA {
10060    pub const ENCODED_LEN: usize = 237usize;
10061    pub const DEFAULT: Self = Self {
10062        time_boot_ms: 0_u32,
10063        firmware_version: 0_u32,
10064        focal_length: 0.0_f32,
10065        sensor_size_h: 0.0_f32,
10066        sensor_size_v: 0.0_f32,
10067        flags: CameraCapFlags::DEFAULT,
10068        resolution_h: 0_u16,
10069        resolution_v: 0_u16,
10070        cam_definition_version: 0_u16,
10071        vendor_name: [0_u8; 32usize],
10072        model_name: [0_u8; 32usize],
10073        lens_id: 0_u8,
10074        cam_definition_uri: CharArray::new([0_u8; 140usize]),
10075        gimbal_device_id: 0_u8,
10076        camera_device_id: 0_u8,
10077    };
10078    #[cfg(feature = "arbitrary")]
10079    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10080        use arbitrary::{Arbitrary, Unstructured};
10081        let mut buf = [0u8; 1024];
10082        rng.fill_bytes(&mut buf);
10083        let mut unstructured = Unstructured::new(&buf);
10084        Self::arbitrary(&mut unstructured).unwrap_or_default()
10085    }
10086}
10087impl Default for CAMERA_INFORMATION_DATA {
10088    fn default() -> Self {
10089        Self::DEFAULT.clone()
10090    }
10091}
10092impl MessageData for CAMERA_INFORMATION_DATA {
10093    type Message = MavMessage;
10094    const ID: u32 = 259u32;
10095    const NAME: &'static str = "CAMERA_INFORMATION";
10096    const EXTRA_CRC: u8 = 92u8;
10097    const ENCODED_LEN: usize = 237usize;
10098    fn deser(
10099        _version: MavlinkVersion,
10100        __input: &[u8],
10101    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10102        let avail_len = __input.len();
10103        let mut payload_buf = [0; Self::ENCODED_LEN];
10104        let mut buf = if avail_len < Self::ENCODED_LEN {
10105            payload_buf[0..avail_len].copy_from_slice(__input);
10106            Bytes::new(&payload_buf)
10107        } else {
10108            Bytes::new(__input)
10109        };
10110        let mut __struct = Self::default();
10111        __struct.time_boot_ms = buf.get_u32_le()?;
10112        __struct.firmware_version = buf.get_u32_le()?;
10113        __struct.focal_length = buf.get_f32_le()?;
10114        __struct.sensor_size_h = buf.get_f32_le()?;
10115        __struct.sensor_size_v = buf.get_f32_le()?;
10116        let tmp = buf.get_u32_le()?;
10117        __struct.flags = CameraCapFlags::from_bits(tmp as <CameraCapFlags as Flags>::Bits).ok_or(
10118            ::mavlink_core::error::ParserError::InvalidFlag {
10119                flag_type: "CameraCapFlags",
10120                value: tmp as u64,
10121            },
10122        )?;
10123        __struct.resolution_h = buf.get_u16_le()?;
10124        __struct.resolution_v = buf.get_u16_le()?;
10125        __struct.cam_definition_version = buf.get_u16_le()?;
10126        for v in &mut __struct.vendor_name {
10127            let val = buf.get_u8()?;
10128            *v = val;
10129        }
10130        for v in &mut __struct.model_name {
10131            let val = buf.get_u8()?;
10132            *v = val;
10133        }
10134        __struct.lens_id = buf.get_u8()?;
10135        let mut tmp = [0_u8; 140usize];
10136        for v in &mut tmp {
10137            *v = buf.get_u8()?;
10138        }
10139        __struct.cam_definition_uri = CharArray::new(tmp);
10140        __struct.gimbal_device_id = buf.get_u8()?;
10141        __struct.camera_device_id = buf.get_u8()?;
10142        Ok(__struct)
10143    }
10144    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10145        let mut __tmp = BytesMut::new(bytes);
10146        #[allow(clippy::absurd_extreme_comparisons)]
10147        #[allow(unused_comparisons)]
10148        if __tmp.remaining() < Self::ENCODED_LEN {
10149            panic!(
10150                "buffer is too small (need {} bytes, but got {})",
10151                Self::ENCODED_LEN,
10152                __tmp.remaining(),
10153            )
10154        }
10155        __tmp.put_u32_le(self.time_boot_ms);
10156        __tmp.put_u32_le(self.firmware_version);
10157        __tmp.put_f32_le(self.focal_length);
10158        __tmp.put_f32_le(self.sensor_size_h);
10159        __tmp.put_f32_le(self.sensor_size_v);
10160        __tmp.put_u32_le(self.flags.bits() as u32);
10161        __tmp.put_u16_le(self.resolution_h);
10162        __tmp.put_u16_le(self.resolution_v);
10163        __tmp.put_u16_le(self.cam_definition_version);
10164        for val in &self.vendor_name {
10165            __tmp.put_u8(*val);
10166        }
10167        for val in &self.model_name {
10168            __tmp.put_u8(*val);
10169        }
10170        __tmp.put_u8(self.lens_id);
10171        for val in &self.cam_definition_uri {
10172            __tmp.put_u8(*val);
10173        }
10174        if matches!(version, MavlinkVersion::V2) {
10175            __tmp.put_u8(self.gimbal_device_id);
10176            __tmp.put_u8(self.camera_device_id);
10177            let len = __tmp.len();
10178            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10179        } else {
10180            __tmp.len()
10181        }
10182    }
10183}
10184#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
10185#[doc = ""]
10186#[doc = "ID: 260"]
10187#[derive(Debug, Clone, PartialEq)]
10188#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10189#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10190#[cfg_attr(feature = "ts", derive(TS))]
10191#[cfg_attr(feature = "ts", ts(export))]
10192pub struct CAMERA_SETTINGS_DATA {
10193    #[doc = "Timestamp (time since system boot)."]
10194    pub time_boot_ms: u32,
10195    #[doc = "Camera mode"]
10196    pub mode_id: CameraMode,
10197    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
10198    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10199    pub zoomLevel: f32,
10200    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
10201    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10202    pub focusLevel: f32,
10203    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
10204    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10205    pub camera_device_id: u8,
10206}
10207impl CAMERA_SETTINGS_DATA {
10208    pub const ENCODED_LEN: usize = 14usize;
10209    pub const DEFAULT: Self = Self {
10210        time_boot_ms: 0_u32,
10211        mode_id: CameraMode::DEFAULT,
10212        zoomLevel: 0.0_f32,
10213        focusLevel: 0.0_f32,
10214        camera_device_id: 0_u8,
10215    };
10216    #[cfg(feature = "arbitrary")]
10217    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10218        use arbitrary::{Arbitrary, Unstructured};
10219        let mut buf = [0u8; 1024];
10220        rng.fill_bytes(&mut buf);
10221        let mut unstructured = Unstructured::new(&buf);
10222        Self::arbitrary(&mut unstructured).unwrap_or_default()
10223    }
10224}
10225impl Default for CAMERA_SETTINGS_DATA {
10226    fn default() -> Self {
10227        Self::DEFAULT.clone()
10228    }
10229}
10230impl MessageData for CAMERA_SETTINGS_DATA {
10231    type Message = MavMessage;
10232    const ID: u32 = 260u32;
10233    const NAME: &'static str = "CAMERA_SETTINGS";
10234    const EXTRA_CRC: u8 = 146u8;
10235    const ENCODED_LEN: usize = 14usize;
10236    fn deser(
10237        _version: MavlinkVersion,
10238        __input: &[u8],
10239    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10240        let avail_len = __input.len();
10241        let mut payload_buf = [0; Self::ENCODED_LEN];
10242        let mut buf = if avail_len < Self::ENCODED_LEN {
10243            payload_buf[0..avail_len].copy_from_slice(__input);
10244            Bytes::new(&payload_buf)
10245        } else {
10246            Bytes::new(__input)
10247        };
10248        let mut __struct = Self::default();
10249        __struct.time_boot_ms = buf.get_u32_le()?;
10250        let tmp = buf.get_u8()?;
10251        __struct.mode_id =
10252            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10253                enum_type: "CameraMode",
10254                value: tmp as u64,
10255            })?;
10256        __struct.zoomLevel = buf.get_f32_le()?;
10257        __struct.focusLevel = buf.get_f32_le()?;
10258        __struct.camera_device_id = buf.get_u8()?;
10259        Ok(__struct)
10260    }
10261    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10262        let mut __tmp = BytesMut::new(bytes);
10263        #[allow(clippy::absurd_extreme_comparisons)]
10264        #[allow(unused_comparisons)]
10265        if __tmp.remaining() < Self::ENCODED_LEN {
10266            panic!(
10267                "buffer is too small (need {} bytes, but got {})",
10268                Self::ENCODED_LEN,
10269                __tmp.remaining(),
10270            )
10271        }
10272        __tmp.put_u32_le(self.time_boot_ms);
10273        __tmp.put_u8(self.mode_id as u8);
10274        if matches!(version, MavlinkVersion::V2) {
10275            __tmp.put_f32_le(self.zoomLevel);
10276            __tmp.put_f32_le(self.focusLevel);
10277            __tmp.put_u8(self.camera_device_id);
10278            let len = __tmp.len();
10279            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10280        } else {
10281            __tmp.len()
10282        }
10283    }
10284}
10285#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
10286#[doc = ""]
10287#[doc = "ID: 277"]
10288#[derive(Debug, Clone, PartialEq)]
10289#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10290#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10291#[cfg_attr(feature = "ts", derive(TS))]
10292#[cfg_attr(feature = "ts", ts(export))]
10293pub struct CAMERA_THERMAL_RANGE_DATA {
10294    #[doc = "Timestamp (time since system boot)."]
10295    pub time_boot_ms: u32,
10296    #[doc = "Temperature max."]
10297    pub max: f32,
10298    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
10299    pub max_point_x: f32,
10300    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
10301    pub max_point_y: f32,
10302    #[doc = "Temperature min."]
10303    pub min: f32,
10304    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
10305    pub min_point_x: f32,
10306    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
10307    pub min_point_y: f32,
10308    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
10309    pub stream_id: u8,
10310    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
10311    pub camera_device_id: u8,
10312}
10313impl CAMERA_THERMAL_RANGE_DATA {
10314    pub const ENCODED_LEN: usize = 30usize;
10315    pub const DEFAULT: Self = Self {
10316        time_boot_ms: 0_u32,
10317        max: 0.0_f32,
10318        max_point_x: 0.0_f32,
10319        max_point_y: 0.0_f32,
10320        min: 0.0_f32,
10321        min_point_x: 0.0_f32,
10322        min_point_y: 0.0_f32,
10323        stream_id: 0_u8,
10324        camera_device_id: 0_u8,
10325    };
10326    #[cfg(feature = "arbitrary")]
10327    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10328        use arbitrary::{Arbitrary, Unstructured};
10329        let mut buf = [0u8; 1024];
10330        rng.fill_bytes(&mut buf);
10331        let mut unstructured = Unstructured::new(&buf);
10332        Self::arbitrary(&mut unstructured).unwrap_or_default()
10333    }
10334}
10335impl Default for CAMERA_THERMAL_RANGE_DATA {
10336    fn default() -> Self {
10337        Self::DEFAULT.clone()
10338    }
10339}
10340impl MessageData for CAMERA_THERMAL_RANGE_DATA {
10341    type Message = MavMessage;
10342    const ID: u32 = 277u32;
10343    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
10344    const EXTRA_CRC: u8 = 62u8;
10345    const ENCODED_LEN: usize = 30usize;
10346    fn deser(
10347        _version: MavlinkVersion,
10348        __input: &[u8],
10349    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10350        let avail_len = __input.len();
10351        let mut payload_buf = [0; Self::ENCODED_LEN];
10352        let mut buf = if avail_len < Self::ENCODED_LEN {
10353            payload_buf[0..avail_len].copy_from_slice(__input);
10354            Bytes::new(&payload_buf)
10355        } else {
10356            Bytes::new(__input)
10357        };
10358        let mut __struct = Self::default();
10359        __struct.time_boot_ms = buf.get_u32_le()?;
10360        __struct.max = buf.get_f32_le()?;
10361        __struct.max_point_x = buf.get_f32_le()?;
10362        __struct.max_point_y = buf.get_f32_le()?;
10363        __struct.min = buf.get_f32_le()?;
10364        __struct.min_point_x = buf.get_f32_le()?;
10365        __struct.min_point_y = buf.get_f32_le()?;
10366        __struct.stream_id = buf.get_u8()?;
10367        __struct.camera_device_id = buf.get_u8()?;
10368        Ok(__struct)
10369    }
10370    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10371        let mut __tmp = BytesMut::new(bytes);
10372        #[allow(clippy::absurd_extreme_comparisons)]
10373        #[allow(unused_comparisons)]
10374        if __tmp.remaining() < Self::ENCODED_LEN {
10375            panic!(
10376                "buffer is too small (need {} bytes, but got {})",
10377                Self::ENCODED_LEN,
10378                __tmp.remaining(),
10379            )
10380        }
10381        __tmp.put_u32_le(self.time_boot_ms);
10382        __tmp.put_f32_le(self.max);
10383        __tmp.put_f32_le(self.max_point_x);
10384        __tmp.put_f32_le(self.max_point_y);
10385        __tmp.put_f32_le(self.min);
10386        __tmp.put_f32_le(self.min_point_x);
10387        __tmp.put_f32_le(self.min_point_y);
10388        __tmp.put_u8(self.stream_id);
10389        __tmp.put_u8(self.camera_device_id);
10390        if matches!(version, MavlinkVersion::V2) {
10391            let len = __tmp.len();
10392            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10393        } else {
10394            __tmp.len()
10395        }
10396    }
10397}
10398#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
10399#[doc = ""]
10400#[doc = "ID: 276"]
10401#[derive(Debug, Clone, PartialEq)]
10402#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10403#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10404#[cfg_attr(feature = "ts", derive(TS))]
10405#[cfg_attr(feature = "ts", ts(export))]
10406pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
10407    #[doc = "Latitude of tracked object"]
10408    pub lat: i32,
10409    #[doc = "Longitude of tracked object"]
10410    pub lon: i32,
10411    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
10412    pub alt: f32,
10413    #[doc = "Horizontal accuracy. NAN if unknown"]
10414    pub h_acc: f32,
10415    #[doc = "Vertical accuracy. NAN if unknown"]
10416    pub v_acc: f32,
10417    #[doc = "North velocity of tracked object. NAN if unknown"]
10418    pub vel_n: f32,
10419    #[doc = "East velocity of tracked object. NAN if unknown"]
10420    pub vel_e: f32,
10421    #[doc = "Down velocity of tracked object. NAN if unknown"]
10422    pub vel_d: f32,
10423    #[doc = "Velocity accuracy. NAN if unknown"]
10424    pub vel_acc: f32,
10425    #[doc = "Distance between camera and tracked object. NAN if unknown"]
10426    pub dist: f32,
10427    #[doc = "Heading in radians, in NED. NAN if unknown"]
10428    pub hdg: f32,
10429    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
10430    pub hdg_acc: f32,
10431    #[doc = "Current tracking status"]
10432    pub tracking_status: CameraTrackingStatusFlags,
10433    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
10434    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10435    pub camera_device_id: u8,
10436}
10437impl CAMERA_TRACKING_GEO_STATUS_DATA {
10438    pub const ENCODED_LEN: usize = 50usize;
10439    pub const DEFAULT: Self = Self {
10440        lat: 0_i32,
10441        lon: 0_i32,
10442        alt: 0.0_f32,
10443        h_acc: 0.0_f32,
10444        v_acc: 0.0_f32,
10445        vel_n: 0.0_f32,
10446        vel_e: 0.0_f32,
10447        vel_d: 0.0_f32,
10448        vel_acc: 0.0_f32,
10449        dist: 0.0_f32,
10450        hdg: 0.0_f32,
10451        hdg_acc: 0.0_f32,
10452        tracking_status: CameraTrackingStatusFlags::DEFAULT,
10453        camera_device_id: 0_u8,
10454    };
10455    #[cfg(feature = "arbitrary")]
10456    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10457        use arbitrary::{Arbitrary, Unstructured};
10458        let mut buf = [0u8; 1024];
10459        rng.fill_bytes(&mut buf);
10460        let mut unstructured = Unstructured::new(&buf);
10461        Self::arbitrary(&mut unstructured).unwrap_or_default()
10462    }
10463}
10464impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
10465    fn default() -> Self {
10466        Self::DEFAULT.clone()
10467    }
10468}
10469impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
10470    type Message = MavMessage;
10471    const ID: u32 = 276u32;
10472    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
10473    const EXTRA_CRC: u8 = 18u8;
10474    const ENCODED_LEN: usize = 50usize;
10475    fn deser(
10476        _version: MavlinkVersion,
10477        __input: &[u8],
10478    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10479        let avail_len = __input.len();
10480        let mut payload_buf = [0; Self::ENCODED_LEN];
10481        let mut buf = if avail_len < Self::ENCODED_LEN {
10482            payload_buf[0..avail_len].copy_from_slice(__input);
10483            Bytes::new(&payload_buf)
10484        } else {
10485            Bytes::new(__input)
10486        };
10487        let mut __struct = Self::default();
10488        __struct.lat = buf.get_i32_le()?;
10489        __struct.lon = buf.get_i32_le()?;
10490        __struct.alt = buf.get_f32_le()?;
10491        __struct.h_acc = buf.get_f32_le()?;
10492        __struct.v_acc = buf.get_f32_le()?;
10493        __struct.vel_n = buf.get_f32_le()?;
10494        __struct.vel_e = buf.get_f32_le()?;
10495        __struct.vel_d = buf.get_f32_le()?;
10496        __struct.vel_acc = buf.get_f32_le()?;
10497        __struct.dist = buf.get_f32_le()?;
10498        __struct.hdg = buf.get_f32_le()?;
10499        __struct.hdg_acc = buf.get_f32_le()?;
10500        let tmp = buf.get_u8()?;
10501        __struct.tracking_status =
10502            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10503                enum_type: "CameraTrackingStatusFlags",
10504                value: tmp as u64,
10505            })?;
10506        __struct.camera_device_id = buf.get_u8()?;
10507        Ok(__struct)
10508    }
10509    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10510        let mut __tmp = BytesMut::new(bytes);
10511        #[allow(clippy::absurd_extreme_comparisons)]
10512        #[allow(unused_comparisons)]
10513        if __tmp.remaining() < Self::ENCODED_LEN {
10514            panic!(
10515                "buffer is too small (need {} bytes, but got {})",
10516                Self::ENCODED_LEN,
10517                __tmp.remaining(),
10518            )
10519        }
10520        __tmp.put_i32_le(self.lat);
10521        __tmp.put_i32_le(self.lon);
10522        __tmp.put_f32_le(self.alt);
10523        __tmp.put_f32_le(self.h_acc);
10524        __tmp.put_f32_le(self.v_acc);
10525        __tmp.put_f32_le(self.vel_n);
10526        __tmp.put_f32_le(self.vel_e);
10527        __tmp.put_f32_le(self.vel_d);
10528        __tmp.put_f32_le(self.vel_acc);
10529        __tmp.put_f32_le(self.dist);
10530        __tmp.put_f32_le(self.hdg);
10531        __tmp.put_f32_le(self.hdg_acc);
10532        __tmp.put_u8(self.tracking_status as u8);
10533        if matches!(version, MavlinkVersion::V2) {
10534            __tmp.put_u8(self.camera_device_id);
10535            let len = __tmp.len();
10536            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10537        } else {
10538            __tmp.len()
10539        }
10540    }
10541}
10542#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
10543#[doc = ""]
10544#[doc = "ID: 275"]
10545#[derive(Debug, Clone, PartialEq)]
10546#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10547#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10548#[cfg_attr(feature = "ts", derive(TS))]
10549#[cfg_attr(feature = "ts", ts(export))]
10550pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
10551    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
10552    pub point_x: f32,
10553    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
10554    pub point_y: f32,
10555    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
10556    pub radius: f32,
10557    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
10558    pub rec_top_x: f32,
10559    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
10560    pub rec_top_y: f32,
10561    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
10562    pub rec_bottom_x: f32,
10563    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
10564    pub rec_bottom_y: f32,
10565    #[doc = "Current tracking status"]
10566    pub tracking_status: CameraTrackingStatusFlags,
10567    #[doc = "Current tracking mode"]
10568    pub tracking_mode: CameraTrackingMode,
10569    #[doc = "Defines location of target data"]
10570    pub target_data: CameraTrackingTargetData,
10571    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
10572    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10573    pub camera_device_id: u8,
10574}
10575impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
10576    pub const ENCODED_LEN: usize = 32usize;
10577    pub const DEFAULT: Self = Self {
10578        point_x: 0.0_f32,
10579        point_y: 0.0_f32,
10580        radius: 0.0_f32,
10581        rec_top_x: 0.0_f32,
10582        rec_top_y: 0.0_f32,
10583        rec_bottom_x: 0.0_f32,
10584        rec_bottom_y: 0.0_f32,
10585        tracking_status: CameraTrackingStatusFlags::DEFAULT,
10586        tracking_mode: CameraTrackingMode::DEFAULT,
10587        target_data: CameraTrackingTargetData::DEFAULT,
10588        camera_device_id: 0_u8,
10589    };
10590    #[cfg(feature = "arbitrary")]
10591    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10592        use arbitrary::{Arbitrary, Unstructured};
10593        let mut buf = [0u8; 1024];
10594        rng.fill_bytes(&mut buf);
10595        let mut unstructured = Unstructured::new(&buf);
10596        Self::arbitrary(&mut unstructured).unwrap_or_default()
10597    }
10598}
10599impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
10600    fn default() -> Self {
10601        Self::DEFAULT.clone()
10602    }
10603}
10604impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
10605    type Message = MavMessage;
10606    const ID: u32 = 275u32;
10607    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
10608    const EXTRA_CRC: u8 = 126u8;
10609    const ENCODED_LEN: usize = 32usize;
10610    fn deser(
10611        _version: MavlinkVersion,
10612        __input: &[u8],
10613    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10614        let avail_len = __input.len();
10615        let mut payload_buf = [0; Self::ENCODED_LEN];
10616        let mut buf = if avail_len < Self::ENCODED_LEN {
10617            payload_buf[0..avail_len].copy_from_slice(__input);
10618            Bytes::new(&payload_buf)
10619        } else {
10620            Bytes::new(__input)
10621        };
10622        let mut __struct = Self::default();
10623        __struct.point_x = buf.get_f32_le()?;
10624        __struct.point_y = buf.get_f32_le()?;
10625        __struct.radius = buf.get_f32_le()?;
10626        __struct.rec_top_x = buf.get_f32_le()?;
10627        __struct.rec_top_y = buf.get_f32_le()?;
10628        __struct.rec_bottom_x = buf.get_f32_le()?;
10629        __struct.rec_bottom_y = buf.get_f32_le()?;
10630        let tmp = buf.get_u8()?;
10631        __struct.tracking_status =
10632            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10633                enum_type: "CameraTrackingStatusFlags",
10634                value: tmp as u64,
10635            })?;
10636        let tmp = buf.get_u8()?;
10637        __struct.tracking_mode =
10638            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10639                enum_type: "CameraTrackingMode",
10640                value: tmp as u64,
10641            })?;
10642        let tmp = buf.get_u8()?;
10643        __struct.target_data =
10644            CameraTrackingTargetData::from_bits(tmp as <CameraTrackingTargetData as Flags>::Bits)
10645                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
10646                flag_type: "CameraTrackingTargetData",
10647                value: tmp as u64,
10648            })?;
10649        __struct.camera_device_id = buf.get_u8()?;
10650        Ok(__struct)
10651    }
10652    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10653        let mut __tmp = BytesMut::new(bytes);
10654        #[allow(clippy::absurd_extreme_comparisons)]
10655        #[allow(unused_comparisons)]
10656        if __tmp.remaining() < Self::ENCODED_LEN {
10657            panic!(
10658                "buffer is too small (need {} bytes, but got {})",
10659                Self::ENCODED_LEN,
10660                __tmp.remaining(),
10661            )
10662        }
10663        __tmp.put_f32_le(self.point_x);
10664        __tmp.put_f32_le(self.point_y);
10665        __tmp.put_f32_le(self.radius);
10666        __tmp.put_f32_le(self.rec_top_x);
10667        __tmp.put_f32_le(self.rec_top_y);
10668        __tmp.put_f32_le(self.rec_bottom_x);
10669        __tmp.put_f32_le(self.rec_bottom_y);
10670        __tmp.put_u8(self.tracking_status as u8);
10671        __tmp.put_u8(self.tracking_mode as u8);
10672        __tmp.put_u8(self.target_data.bits() as u8);
10673        if matches!(version, MavlinkVersion::V2) {
10674            __tmp.put_u8(self.camera_device_id);
10675            let len = __tmp.len();
10676            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10677        } else {
10678            __tmp.len()
10679        }
10680    }
10681}
10682#[doc = "Camera-IMU triggering and synchronisation message."]
10683#[doc = ""]
10684#[doc = "ID: 112"]
10685#[derive(Debug, Clone, PartialEq)]
10686#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10687#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10688#[cfg_attr(feature = "ts", derive(TS))]
10689#[cfg_attr(feature = "ts", ts(export))]
10690pub struct CAMERA_TRIGGER_DATA {
10691    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10692    pub time_usec: u64,
10693    #[doc = "Image frame sequence"]
10694    pub seq: u32,
10695}
10696impl CAMERA_TRIGGER_DATA {
10697    pub const ENCODED_LEN: usize = 12usize;
10698    pub const DEFAULT: Self = Self {
10699        time_usec: 0_u64,
10700        seq: 0_u32,
10701    };
10702    #[cfg(feature = "arbitrary")]
10703    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10704        use arbitrary::{Arbitrary, Unstructured};
10705        let mut buf = [0u8; 1024];
10706        rng.fill_bytes(&mut buf);
10707        let mut unstructured = Unstructured::new(&buf);
10708        Self::arbitrary(&mut unstructured).unwrap_or_default()
10709    }
10710}
10711impl Default for CAMERA_TRIGGER_DATA {
10712    fn default() -> Self {
10713        Self::DEFAULT.clone()
10714    }
10715}
10716impl MessageData for CAMERA_TRIGGER_DATA {
10717    type Message = MavMessage;
10718    const ID: u32 = 112u32;
10719    const NAME: &'static str = "CAMERA_TRIGGER";
10720    const EXTRA_CRC: u8 = 174u8;
10721    const ENCODED_LEN: usize = 12usize;
10722    fn deser(
10723        _version: MavlinkVersion,
10724        __input: &[u8],
10725    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10726        let avail_len = __input.len();
10727        let mut payload_buf = [0; Self::ENCODED_LEN];
10728        let mut buf = if avail_len < Self::ENCODED_LEN {
10729            payload_buf[0..avail_len].copy_from_slice(__input);
10730            Bytes::new(&payload_buf)
10731        } else {
10732            Bytes::new(__input)
10733        };
10734        let mut __struct = Self::default();
10735        __struct.time_usec = buf.get_u64_le()?;
10736        __struct.seq = buf.get_u32_le()?;
10737        Ok(__struct)
10738    }
10739    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10740        let mut __tmp = BytesMut::new(bytes);
10741        #[allow(clippy::absurd_extreme_comparisons)]
10742        #[allow(unused_comparisons)]
10743        if __tmp.remaining() < Self::ENCODED_LEN {
10744            panic!(
10745                "buffer is too small (need {} bytes, but got {})",
10746                Self::ENCODED_LEN,
10747                __tmp.remaining(),
10748            )
10749        }
10750        __tmp.put_u64_le(self.time_usec);
10751        __tmp.put_u32_le(self.seq);
10752        if matches!(version, MavlinkVersion::V2) {
10753            let len = __tmp.len();
10754            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10755        } else {
10756            __tmp.len()
10757        }
10758    }
10759}
10760#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
10761#[doc = ""]
10762#[doc = "ID: 387"]
10763#[derive(Debug, Clone, PartialEq)]
10764#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10765#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10766#[cfg_attr(feature = "ts", derive(TS))]
10767#[cfg_attr(feature = "ts", ts(export))]
10768pub struct CANFD_FRAME_DATA {
10769    #[doc = "Frame ID"]
10770    pub id: u32,
10771    #[doc = "System ID."]
10772    pub target_system: u8,
10773    #[doc = "Component ID."]
10774    pub target_component: u8,
10775    #[doc = "bus number"]
10776    pub bus: u8,
10777    #[doc = "Frame length"]
10778    pub len: u8,
10779    #[doc = "Frame data"]
10780    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10781    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10782    pub data: [u8; 64],
10783}
10784impl CANFD_FRAME_DATA {
10785    pub const ENCODED_LEN: usize = 72usize;
10786    pub const DEFAULT: Self = Self {
10787        id: 0_u32,
10788        target_system: 0_u8,
10789        target_component: 0_u8,
10790        bus: 0_u8,
10791        len: 0_u8,
10792        data: [0_u8; 64usize],
10793    };
10794    #[cfg(feature = "arbitrary")]
10795    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10796        use arbitrary::{Arbitrary, Unstructured};
10797        let mut buf = [0u8; 1024];
10798        rng.fill_bytes(&mut buf);
10799        let mut unstructured = Unstructured::new(&buf);
10800        Self::arbitrary(&mut unstructured).unwrap_or_default()
10801    }
10802}
10803impl Default for CANFD_FRAME_DATA {
10804    fn default() -> Self {
10805        Self::DEFAULT.clone()
10806    }
10807}
10808impl MessageData for CANFD_FRAME_DATA {
10809    type Message = MavMessage;
10810    const ID: u32 = 387u32;
10811    const NAME: &'static str = "CANFD_FRAME";
10812    const EXTRA_CRC: u8 = 4u8;
10813    const ENCODED_LEN: usize = 72usize;
10814    fn deser(
10815        _version: MavlinkVersion,
10816        __input: &[u8],
10817    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10818        let avail_len = __input.len();
10819        let mut payload_buf = [0; Self::ENCODED_LEN];
10820        let mut buf = if avail_len < Self::ENCODED_LEN {
10821            payload_buf[0..avail_len].copy_from_slice(__input);
10822            Bytes::new(&payload_buf)
10823        } else {
10824            Bytes::new(__input)
10825        };
10826        let mut __struct = Self::default();
10827        __struct.id = buf.get_u32_le()?;
10828        __struct.target_system = buf.get_u8()?;
10829        __struct.target_component = buf.get_u8()?;
10830        __struct.bus = buf.get_u8()?;
10831        __struct.len = buf.get_u8()?;
10832        for v in &mut __struct.data {
10833            let val = buf.get_u8()?;
10834            *v = val;
10835        }
10836        Ok(__struct)
10837    }
10838    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10839        let mut __tmp = BytesMut::new(bytes);
10840        #[allow(clippy::absurd_extreme_comparisons)]
10841        #[allow(unused_comparisons)]
10842        if __tmp.remaining() < Self::ENCODED_LEN {
10843            panic!(
10844                "buffer is too small (need {} bytes, but got {})",
10845                Self::ENCODED_LEN,
10846                __tmp.remaining(),
10847            )
10848        }
10849        __tmp.put_u32_le(self.id);
10850        __tmp.put_u8(self.target_system);
10851        __tmp.put_u8(self.target_component);
10852        __tmp.put_u8(self.bus);
10853        __tmp.put_u8(self.len);
10854        for val in &self.data {
10855            __tmp.put_u8(*val);
10856        }
10857        if matches!(version, MavlinkVersion::V2) {
10858            let len = __tmp.len();
10859            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10860        } else {
10861            __tmp.len()
10862        }
10863    }
10864}
10865#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
10866#[doc = ""]
10867#[doc = "ID: 388"]
10868#[derive(Debug, Clone, PartialEq)]
10869#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10870#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10871#[cfg_attr(feature = "ts", derive(TS))]
10872#[cfg_attr(feature = "ts", ts(export))]
10873pub struct CAN_FILTER_MODIFY_DATA {
10874    #[doc = "filter IDs, length num_ids"]
10875    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10876    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10877    pub ids: [u16; 16],
10878    #[doc = "System ID."]
10879    pub target_system: u8,
10880    #[doc = "Component ID."]
10881    pub target_component: u8,
10882    #[doc = "bus number"]
10883    pub bus: u8,
10884    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
10885    pub operation: CanFilterOp,
10886    #[doc = "number of IDs in filter list"]
10887    pub num_ids: u8,
10888}
10889impl CAN_FILTER_MODIFY_DATA {
10890    pub const ENCODED_LEN: usize = 37usize;
10891    pub const DEFAULT: Self = Self {
10892        ids: [0_u16; 16usize],
10893        target_system: 0_u8,
10894        target_component: 0_u8,
10895        bus: 0_u8,
10896        operation: CanFilterOp::DEFAULT,
10897        num_ids: 0_u8,
10898    };
10899    #[cfg(feature = "arbitrary")]
10900    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10901        use arbitrary::{Arbitrary, Unstructured};
10902        let mut buf = [0u8; 1024];
10903        rng.fill_bytes(&mut buf);
10904        let mut unstructured = Unstructured::new(&buf);
10905        Self::arbitrary(&mut unstructured).unwrap_or_default()
10906    }
10907}
10908impl Default for CAN_FILTER_MODIFY_DATA {
10909    fn default() -> Self {
10910        Self::DEFAULT.clone()
10911    }
10912}
10913impl MessageData for CAN_FILTER_MODIFY_DATA {
10914    type Message = MavMessage;
10915    const ID: u32 = 388u32;
10916    const NAME: &'static str = "CAN_FILTER_MODIFY";
10917    const EXTRA_CRC: u8 = 8u8;
10918    const ENCODED_LEN: usize = 37usize;
10919    fn deser(
10920        _version: MavlinkVersion,
10921        __input: &[u8],
10922    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10923        let avail_len = __input.len();
10924        let mut payload_buf = [0; Self::ENCODED_LEN];
10925        let mut buf = if avail_len < Self::ENCODED_LEN {
10926            payload_buf[0..avail_len].copy_from_slice(__input);
10927            Bytes::new(&payload_buf)
10928        } else {
10929            Bytes::new(__input)
10930        };
10931        let mut __struct = Self::default();
10932        for v in &mut __struct.ids {
10933            let val = buf.get_u16_le()?;
10934            *v = val;
10935        }
10936        __struct.target_system = buf.get_u8()?;
10937        __struct.target_component = buf.get_u8()?;
10938        __struct.bus = buf.get_u8()?;
10939        let tmp = buf.get_u8()?;
10940        __struct.operation =
10941            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10942                enum_type: "CanFilterOp",
10943                value: tmp as u64,
10944            })?;
10945        __struct.num_ids = buf.get_u8()?;
10946        Ok(__struct)
10947    }
10948    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10949        let mut __tmp = BytesMut::new(bytes);
10950        #[allow(clippy::absurd_extreme_comparisons)]
10951        #[allow(unused_comparisons)]
10952        if __tmp.remaining() < Self::ENCODED_LEN {
10953            panic!(
10954                "buffer is too small (need {} bytes, but got {})",
10955                Self::ENCODED_LEN,
10956                __tmp.remaining(),
10957            )
10958        }
10959        for val in &self.ids {
10960            __tmp.put_u16_le(*val);
10961        }
10962        __tmp.put_u8(self.target_system);
10963        __tmp.put_u8(self.target_component);
10964        __tmp.put_u8(self.bus);
10965        __tmp.put_u8(self.operation as u8);
10966        __tmp.put_u8(self.num_ids);
10967        if matches!(version, MavlinkVersion::V2) {
10968            let len = __tmp.len();
10969            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10970        } else {
10971            __tmp.len()
10972        }
10973    }
10974}
10975#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
10976#[doc = ""]
10977#[doc = "ID: 386"]
10978#[derive(Debug, Clone, PartialEq)]
10979#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10980#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10981#[cfg_attr(feature = "ts", derive(TS))]
10982#[cfg_attr(feature = "ts", ts(export))]
10983pub struct CAN_FRAME_DATA {
10984    #[doc = "Frame ID"]
10985    pub id: u32,
10986    #[doc = "System ID."]
10987    pub target_system: u8,
10988    #[doc = "Component ID."]
10989    pub target_component: u8,
10990    #[doc = "Bus number"]
10991    pub bus: u8,
10992    #[doc = "Frame length"]
10993    pub len: u8,
10994    #[doc = "Frame data"]
10995    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10996    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10997    pub data: [u8; 8],
10998}
10999impl CAN_FRAME_DATA {
11000    pub const ENCODED_LEN: usize = 16usize;
11001    pub const DEFAULT: Self = Self {
11002        id: 0_u32,
11003        target_system: 0_u8,
11004        target_component: 0_u8,
11005        bus: 0_u8,
11006        len: 0_u8,
11007        data: [0_u8; 8usize],
11008    };
11009    #[cfg(feature = "arbitrary")]
11010    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11011        use arbitrary::{Arbitrary, Unstructured};
11012        let mut buf = [0u8; 1024];
11013        rng.fill_bytes(&mut buf);
11014        let mut unstructured = Unstructured::new(&buf);
11015        Self::arbitrary(&mut unstructured).unwrap_or_default()
11016    }
11017}
11018impl Default for CAN_FRAME_DATA {
11019    fn default() -> Self {
11020        Self::DEFAULT.clone()
11021    }
11022}
11023impl MessageData for CAN_FRAME_DATA {
11024    type Message = MavMessage;
11025    const ID: u32 = 386u32;
11026    const NAME: &'static str = "CAN_FRAME";
11027    const EXTRA_CRC: u8 = 132u8;
11028    const ENCODED_LEN: usize = 16usize;
11029    fn deser(
11030        _version: MavlinkVersion,
11031        __input: &[u8],
11032    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11033        let avail_len = __input.len();
11034        let mut payload_buf = [0; Self::ENCODED_LEN];
11035        let mut buf = if avail_len < Self::ENCODED_LEN {
11036            payload_buf[0..avail_len].copy_from_slice(__input);
11037            Bytes::new(&payload_buf)
11038        } else {
11039            Bytes::new(__input)
11040        };
11041        let mut __struct = Self::default();
11042        __struct.id = buf.get_u32_le()?;
11043        __struct.target_system = buf.get_u8()?;
11044        __struct.target_component = buf.get_u8()?;
11045        __struct.bus = buf.get_u8()?;
11046        __struct.len = buf.get_u8()?;
11047        for v in &mut __struct.data {
11048            let val = buf.get_u8()?;
11049            *v = val;
11050        }
11051        Ok(__struct)
11052    }
11053    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11054        let mut __tmp = BytesMut::new(bytes);
11055        #[allow(clippy::absurd_extreme_comparisons)]
11056        #[allow(unused_comparisons)]
11057        if __tmp.remaining() < Self::ENCODED_LEN {
11058            panic!(
11059                "buffer is too small (need {} bytes, but got {})",
11060                Self::ENCODED_LEN,
11061                __tmp.remaining(),
11062            )
11063        }
11064        __tmp.put_u32_le(self.id);
11065        __tmp.put_u8(self.target_system);
11066        __tmp.put_u8(self.target_component);
11067        __tmp.put_u8(self.bus);
11068        __tmp.put_u8(self.len);
11069        for val in &self.data {
11070            __tmp.put_u8(*val);
11071        }
11072        if matches!(version, MavlinkVersion::V2) {
11073            let len = __tmp.len();
11074            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11075        } else {
11076            __tmp.len()
11077        }
11078    }
11079}
11080#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
11081#[doc = ""]
11082#[doc = "ID: 336"]
11083#[derive(Debug, Clone, PartialEq)]
11084#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11085#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11086#[cfg_attr(feature = "ts", derive(TS))]
11087#[cfg_attr(feature = "ts", ts(export))]
11088pub struct CELLULAR_CONFIG_DATA {
11089    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
11090    pub enable_lte: u8,
11091    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
11092    pub enable_pin: u8,
11093    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
11094    #[cfg_attr(feature = "ts", ts(type = "string"))]
11095    pub pin: CharArray<16>,
11096    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
11097    #[cfg_attr(feature = "ts", ts(type = "string"))]
11098    pub new_pin: CharArray<16>,
11099    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
11100    #[cfg_attr(feature = "ts", ts(type = "string"))]
11101    pub apn: CharArray<32>,
11102    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
11103    #[cfg_attr(feature = "ts", ts(type = "string"))]
11104    pub puk: CharArray<16>,
11105    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
11106    pub roaming: u8,
11107    #[doc = "Message acceptance response (sent back to GS)."]
11108    pub response: CellularConfigResponse,
11109}
11110impl CELLULAR_CONFIG_DATA {
11111    pub const ENCODED_LEN: usize = 84usize;
11112    pub const DEFAULT: Self = Self {
11113        enable_lte: 0_u8,
11114        enable_pin: 0_u8,
11115        pin: CharArray::new([0_u8; 16usize]),
11116        new_pin: CharArray::new([0_u8; 16usize]),
11117        apn: CharArray::new([0_u8; 32usize]),
11118        puk: CharArray::new([0_u8; 16usize]),
11119        roaming: 0_u8,
11120        response: CellularConfigResponse::DEFAULT,
11121    };
11122    #[cfg(feature = "arbitrary")]
11123    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11124        use arbitrary::{Arbitrary, Unstructured};
11125        let mut buf = [0u8; 1024];
11126        rng.fill_bytes(&mut buf);
11127        let mut unstructured = Unstructured::new(&buf);
11128        Self::arbitrary(&mut unstructured).unwrap_or_default()
11129    }
11130}
11131impl Default for CELLULAR_CONFIG_DATA {
11132    fn default() -> Self {
11133        Self::DEFAULT.clone()
11134    }
11135}
11136impl MessageData for CELLULAR_CONFIG_DATA {
11137    type Message = MavMessage;
11138    const ID: u32 = 336u32;
11139    const NAME: &'static str = "CELLULAR_CONFIG";
11140    const EXTRA_CRC: u8 = 245u8;
11141    const ENCODED_LEN: usize = 84usize;
11142    fn deser(
11143        _version: MavlinkVersion,
11144        __input: &[u8],
11145    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11146        let avail_len = __input.len();
11147        let mut payload_buf = [0; Self::ENCODED_LEN];
11148        let mut buf = if avail_len < Self::ENCODED_LEN {
11149            payload_buf[0..avail_len].copy_from_slice(__input);
11150            Bytes::new(&payload_buf)
11151        } else {
11152            Bytes::new(__input)
11153        };
11154        let mut __struct = Self::default();
11155        __struct.enable_lte = buf.get_u8()?;
11156        __struct.enable_pin = buf.get_u8()?;
11157        let mut tmp = [0_u8; 16usize];
11158        for v in &mut tmp {
11159            *v = buf.get_u8()?;
11160        }
11161        __struct.pin = CharArray::new(tmp);
11162        let mut tmp = [0_u8; 16usize];
11163        for v in &mut tmp {
11164            *v = buf.get_u8()?;
11165        }
11166        __struct.new_pin = CharArray::new(tmp);
11167        let mut tmp = [0_u8; 32usize];
11168        for v in &mut tmp {
11169            *v = buf.get_u8()?;
11170        }
11171        __struct.apn = CharArray::new(tmp);
11172        let mut tmp = [0_u8; 16usize];
11173        for v in &mut tmp {
11174            *v = buf.get_u8()?;
11175        }
11176        __struct.puk = CharArray::new(tmp);
11177        __struct.roaming = buf.get_u8()?;
11178        let tmp = buf.get_u8()?;
11179        __struct.response =
11180            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11181                enum_type: "CellularConfigResponse",
11182                value: tmp as u64,
11183            })?;
11184        Ok(__struct)
11185    }
11186    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11187        let mut __tmp = BytesMut::new(bytes);
11188        #[allow(clippy::absurd_extreme_comparisons)]
11189        #[allow(unused_comparisons)]
11190        if __tmp.remaining() < Self::ENCODED_LEN {
11191            panic!(
11192                "buffer is too small (need {} bytes, but got {})",
11193                Self::ENCODED_LEN,
11194                __tmp.remaining(),
11195            )
11196        }
11197        __tmp.put_u8(self.enable_lte);
11198        __tmp.put_u8(self.enable_pin);
11199        for val in &self.pin {
11200            __tmp.put_u8(*val);
11201        }
11202        for val in &self.new_pin {
11203            __tmp.put_u8(*val);
11204        }
11205        for val in &self.apn {
11206            __tmp.put_u8(*val);
11207        }
11208        for val in &self.puk {
11209            __tmp.put_u8(*val);
11210        }
11211        __tmp.put_u8(self.roaming);
11212        __tmp.put_u8(self.response as u8);
11213        if matches!(version, MavlinkVersion::V2) {
11214            let len = __tmp.len();
11215            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11216        } else {
11217            __tmp.len()
11218        }
11219    }
11220}
11221#[doc = "Report current used cellular network status."]
11222#[doc = ""]
11223#[doc = "ID: 334"]
11224#[derive(Debug, Clone, PartialEq)]
11225#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11226#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11227#[cfg_attr(feature = "ts", derive(TS))]
11228#[cfg_attr(feature = "ts", ts(export))]
11229pub struct CELLULAR_STATUS_DATA {
11230    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
11231    pub mcc: u16,
11232    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
11233    pub mnc: u16,
11234    #[doc = "Location area code. If unknown, set to 0"]
11235    pub lac: u16,
11236    #[doc = "Cellular modem status"]
11237    pub status: CellularStatusFlag,
11238    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
11239    pub failure_reason: CellularNetworkFailedReason,
11240    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
11241    pub mavtype: CellularNetworkRadioType,
11242    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
11243    pub quality: u8,
11244}
11245impl CELLULAR_STATUS_DATA {
11246    pub const ENCODED_LEN: usize = 10usize;
11247    pub const DEFAULT: Self = Self {
11248        mcc: 0_u16,
11249        mnc: 0_u16,
11250        lac: 0_u16,
11251        status: CellularStatusFlag::DEFAULT,
11252        failure_reason: CellularNetworkFailedReason::DEFAULT,
11253        mavtype: CellularNetworkRadioType::DEFAULT,
11254        quality: 0_u8,
11255    };
11256    #[cfg(feature = "arbitrary")]
11257    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11258        use arbitrary::{Arbitrary, Unstructured};
11259        let mut buf = [0u8; 1024];
11260        rng.fill_bytes(&mut buf);
11261        let mut unstructured = Unstructured::new(&buf);
11262        Self::arbitrary(&mut unstructured).unwrap_or_default()
11263    }
11264}
11265impl Default for CELLULAR_STATUS_DATA {
11266    fn default() -> Self {
11267        Self::DEFAULT.clone()
11268    }
11269}
11270impl MessageData for CELLULAR_STATUS_DATA {
11271    type Message = MavMessage;
11272    const ID: u32 = 334u32;
11273    const NAME: &'static str = "CELLULAR_STATUS";
11274    const EXTRA_CRC: u8 = 72u8;
11275    const ENCODED_LEN: usize = 10usize;
11276    fn deser(
11277        _version: MavlinkVersion,
11278        __input: &[u8],
11279    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11280        let avail_len = __input.len();
11281        let mut payload_buf = [0; Self::ENCODED_LEN];
11282        let mut buf = if avail_len < Self::ENCODED_LEN {
11283            payload_buf[0..avail_len].copy_from_slice(__input);
11284            Bytes::new(&payload_buf)
11285        } else {
11286            Bytes::new(__input)
11287        };
11288        let mut __struct = Self::default();
11289        __struct.mcc = buf.get_u16_le()?;
11290        __struct.mnc = buf.get_u16_le()?;
11291        __struct.lac = buf.get_u16_le()?;
11292        let tmp = buf.get_u8()?;
11293        __struct.status =
11294            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11295                enum_type: "CellularStatusFlag",
11296                value: tmp as u64,
11297            })?;
11298        let tmp = buf.get_u8()?;
11299        __struct.failure_reason =
11300            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11301                enum_type: "CellularNetworkFailedReason",
11302                value: tmp as u64,
11303            })?;
11304        let tmp = buf.get_u8()?;
11305        __struct.mavtype =
11306            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11307                enum_type: "CellularNetworkRadioType",
11308                value: tmp as u64,
11309            })?;
11310        __struct.quality = buf.get_u8()?;
11311        Ok(__struct)
11312    }
11313    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11314        let mut __tmp = BytesMut::new(bytes);
11315        #[allow(clippy::absurd_extreme_comparisons)]
11316        #[allow(unused_comparisons)]
11317        if __tmp.remaining() < Self::ENCODED_LEN {
11318            panic!(
11319                "buffer is too small (need {} bytes, but got {})",
11320                Self::ENCODED_LEN,
11321                __tmp.remaining(),
11322            )
11323        }
11324        __tmp.put_u16_le(self.mcc);
11325        __tmp.put_u16_le(self.mnc);
11326        __tmp.put_u16_le(self.lac);
11327        __tmp.put_u8(self.status as u8);
11328        __tmp.put_u8(self.failure_reason as u8);
11329        __tmp.put_u8(self.mavtype as u8);
11330        __tmp.put_u8(self.quality);
11331        if matches!(version, MavlinkVersion::V2) {
11332            let len = __tmp.len();
11333            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11334        } else {
11335            __tmp.len()
11336        }
11337    }
11338}
11339#[doc = "Request to control this MAV."]
11340#[doc = ""]
11341#[doc = "ID: 5"]
11342#[derive(Debug, Clone, PartialEq)]
11343#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11344#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11345#[cfg_attr(feature = "ts", derive(TS))]
11346#[cfg_attr(feature = "ts", ts(export))]
11347pub struct CHANGE_OPERATOR_CONTROL_DATA {
11348    #[doc = "System the GCS requests control for"]
11349    pub target_system: u8,
11350    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
11351    pub control_request: u8,
11352    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
11353    pub version: u8,
11354    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
11355    #[cfg_attr(feature = "ts", ts(type = "string"))]
11356    pub passkey: CharArray<25>,
11357}
11358impl CHANGE_OPERATOR_CONTROL_DATA {
11359    pub const ENCODED_LEN: usize = 28usize;
11360    pub const DEFAULT: Self = Self {
11361        target_system: 0_u8,
11362        control_request: 0_u8,
11363        version: 0_u8,
11364        passkey: CharArray::new([0_u8; 25usize]),
11365    };
11366    #[cfg(feature = "arbitrary")]
11367    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11368        use arbitrary::{Arbitrary, Unstructured};
11369        let mut buf = [0u8; 1024];
11370        rng.fill_bytes(&mut buf);
11371        let mut unstructured = Unstructured::new(&buf);
11372        Self::arbitrary(&mut unstructured).unwrap_or_default()
11373    }
11374}
11375impl Default for CHANGE_OPERATOR_CONTROL_DATA {
11376    fn default() -> Self {
11377        Self::DEFAULT.clone()
11378    }
11379}
11380impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
11381    type Message = MavMessage;
11382    const ID: u32 = 5u32;
11383    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
11384    const EXTRA_CRC: u8 = 217u8;
11385    const ENCODED_LEN: usize = 28usize;
11386    fn deser(
11387        _version: MavlinkVersion,
11388        __input: &[u8],
11389    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11390        let avail_len = __input.len();
11391        let mut payload_buf = [0; Self::ENCODED_LEN];
11392        let mut buf = if avail_len < Self::ENCODED_LEN {
11393            payload_buf[0..avail_len].copy_from_slice(__input);
11394            Bytes::new(&payload_buf)
11395        } else {
11396            Bytes::new(__input)
11397        };
11398        let mut __struct = Self::default();
11399        __struct.target_system = buf.get_u8()?;
11400        __struct.control_request = buf.get_u8()?;
11401        __struct.version = buf.get_u8()?;
11402        let mut tmp = [0_u8; 25usize];
11403        for v in &mut tmp {
11404            *v = buf.get_u8()?;
11405        }
11406        __struct.passkey = CharArray::new(tmp);
11407        Ok(__struct)
11408    }
11409    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11410        let mut __tmp = BytesMut::new(bytes);
11411        #[allow(clippy::absurd_extreme_comparisons)]
11412        #[allow(unused_comparisons)]
11413        if __tmp.remaining() < Self::ENCODED_LEN {
11414            panic!(
11415                "buffer is too small (need {} bytes, but got {})",
11416                Self::ENCODED_LEN,
11417                __tmp.remaining(),
11418            )
11419        }
11420        __tmp.put_u8(self.target_system);
11421        __tmp.put_u8(self.control_request);
11422        __tmp.put_u8(self.version);
11423        for val in &self.passkey {
11424            __tmp.put_u8(*val);
11425        }
11426        if matches!(version, MavlinkVersion::V2) {
11427            let len = __tmp.len();
11428            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11429        } else {
11430            __tmp.len()
11431        }
11432    }
11433}
11434#[doc = "Accept / deny control of this MAV."]
11435#[doc = ""]
11436#[doc = "ID: 6"]
11437#[derive(Debug, Clone, PartialEq)]
11438#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11439#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11440#[cfg_attr(feature = "ts", derive(TS))]
11441#[cfg_attr(feature = "ts", ts(export))]
11442pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
11443    #[doc = "ID of the GCS this message"]
11444    pub gcs_system_id: u8,
11445    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
11446    pub control_request: u8,
11447    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
11448    pub ack: u8,
11449}
11450impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
11451    pub const ENCODED_LEN: usize = 3usize;
11452    pub const DEFAULT: Self = Self {
11453        gcs_system_id: 0_u8,
11454        control_request: 0_u8,
11455        ack: 0_u8,
11456    };
11457    #[cfg(feature = "arbitrary")]
11458    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11459        use arbitrary::{Arbitrary, Unstructured};
11460        let mut buf = [0u8; 1024];
11461        rng.fill_bytes(&mut buf);
11462        let mut unstructured = Unstructured::new(&buf);
11463        Self::arbitrary(&mut unstructured).unwrap_or_default()
11464    }
11465}
11466impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
11467    fn default() -> Self {
11468        Self::DEFAULT.clone()
11469    }
11470}
11471impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
11472    type Message = MavMessage;
11473    const ID: u32 = 6u32;
11474    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
11475    const EXTRA_CRC: u8 = 104u8;
11476    const ENCODED_LEN: usize = 3usize;
11477    fn deser(
11478        _version: MavlinkVersion,
11479        __input: &[u8],
11480    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11481        let avail_len = __input.len();
11482        let mut payload_buf = [0; Self::ENCODED_LEN];
11483        let mut buf = if avail_len < Self::ENCODED_LEN {
11484            payload_buf[0..avail_len].copy_from_slice(__input);
11485            Bytes::new(&payload_buf)
11486        } else {
11487            Bytes::new(__input)
11488        };
11489        let mut __struct = Self::default();
11490        __struct.gcs_system_id = buf.get_u8()?;
11491        __struct.control_request = buf.get_u8()?;
11492        __struct.ack = buf.get_u8()?;
11493        Ok(__struct)
11494    }
11495    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11496        let mut __tmp = BytesMut::new(bytes);
11497        #[allow(clippy::absurd_extreme_comparisons)]
11498        #[allow(unused_comparisons)]
11499        if __tmp.remaining() < Self::ENCODED_LEN {
11500            panic!(
11501                "buffer is too small (need {} bytes, but got {})",
11502                Self::ENCODED_LEN,
11503                __tmp.remaining(),
11504            )
11505        }
11506        __tmp.put_u8(self.gcs_system_id);
11507        __tmp.put_u8(self.control_request);
11508        __tmp.put_u8(self.ack);
11509        if matches!(version, MavlinkVersion::V2) {
11510            let len = __tmp.len();
11511            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11512        } else {
11513            __tmp.len()
11514        }
11515    }
11516}
11517#[doc = "Information about a potential collision."]
11518#[doc = ""]
11519#[doc = "ID: 247"]
11520#[derive(Debug, Clone, PartialEq)]
11521#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11522#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11523#[cfg_attr(feature = "ts", derive(TS))]
11524#[cfg_attr(feature = "ts", ts(export))]
11525pub struct COLLISION_DATA {
11526    #[doc = "Unique identifier, domain based on src field"]
11527    pub id: u32,
11528    #[doc = "Estimated time until collision occurs"]
11529    pub time_to_minimum_delta: f32,
11530    #[doc = "Closest vertical distance between vehicle and object"]
11531    pub altitude_minimum_delta: f32,
11532    #[doc = "Closest horizontal distance between vehicle and object"]
11533    pub horizontal_minimum_delta: f32,
11534    #[doc = "Collision data source"]
11535    pub src: MavCollisionSrc,
11536    #[doc = "Action that is being taken to avoid this collision"]
11537    pub action: MavCollisionAction,
11538    #[doc = "How concerned the aircraft is about this collision"]
11539    pub threat_level: MavCollisionThreatLevel,
11540}
11541impl COLLISION_DATA {
11542    pub const ENCODED_LEN: usize = 19usize;
11543    pub const DEFAULT: Self = Self {
11544        id: 0_u32,
11545        time_to_minimum_delta: 0.0_f32,
11546        altitude_minimum_delta: 0.0_f32,
11547        horizontal_minimum_delta: 0.0_f32,
11548        src: MavCollisionSrc::DEFAULT,
11549        action: MavCollisionAction::DEFAULT,
11550        threat_level: MavCollisionThreatLevel::DEFAULT,
11551    };
11552    #[cfg(feature = "arbitrary")]
11553    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11554        use arbitrary::{Arbitrary, Unstructured};
11555        let mut buf = [0u8; 1024];
11556        rng.fill_bytes(&mut buf);
11557        let mut unstructured = Unstructured::new(&buf);
11558        Self::arbitrary(&mut unstructured).unwrap_or_default()
11559    }
11560}
11561impl Default for COLLISION_DATA {
11562    fn default() -> Self {
11563        Self::DEFAULT.clone()
11564    }
11565}
11566impl MessageData for COLLISION_DATA {
11567    type Message = MavMessage;
11568    const ID: u32 = 247u32;
11569    const NAME: &'static str = "COLLISION";
11570    const EXTRA_CRC: u8 = 81u8;
11571    const ENCODED_LEN: usize = 19usize;
11572    fn deser(
11573        _version: MavlinkVersion,
11574        __input: &[u8],
11575    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11576        let avail_len = __input.len();
11577        let mut payload_buf = [0; Self::ENCODED_LEN];
11578        let mut buf = if avail_len < Self::ENCODED_LEN {
11579            payload_buf[0..avail_len].copy_from_slice(__input);
11580            Bytes::new(&payload_buf)
11581        } else {
11582            Bytes::new(__input)
11583        };
11584        let mut __struct = Self::default();
11585        __struct.id = buf.get_u32_le()?;
11586        __struct.time_to_minimum_delta = buf.get_f32_le()?;
11587        __struct.altitude_minimum_delta = buf.get_f32_le()?;
11588        __struct.horizontal_minimum_delta = buf.get_f32_le()?;
11589        let tmp = buf.get_u8()?;
11590        __struct.src =
11591            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11592                enum_type: "MavCollisionSrc",
11593                value: tmp as u64,
11594            })?;
11595        let tmp = buf.get_u8()?;
11596        __struct.action =
11597            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11598                enum_type: "MavCollisionAction",
11599                value: tmp as u64,
11600            })?;
11601        let tmp = buf.get_u8()?;
11602        __struct.threat_level =
11603            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11604                enum_type: "MavCollisionThreatLevel",
11605                value: tmp as u64,
11606            })?;
11607        Ok(__struct)
11608    }
11609    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11610        let mut __tmp = BytesMut::new(bytes);
11611        #[allow(clippy::absurd_extreme_comparisons)]
11612        #[allow(unused_comparisons)]
11613        if __tmp.remaining() < Self::ENCODED_LEN {
11614            panic!(
11615                "buffer is too small (need {} bytes, but got {})",
11616                Self::ENCODED_LEN,
11617                __tmp.remaining(),
11618            )
11619        }
11620        __tmp.put_u32_le(self.id);
11621        __tmp.put_f32_le(self.time_to_minimum_delta);
11622        __tmp.put_f32_le(self.altitude_minimum_delta);
11623        __tmp.put_f32_le(self.horizontal_minimum_delta);
11624        __tmp.put_u8(self.src as u8);
11625        __tmp.put_u8(self.action as u8);
11626        __tmp.put_u8(self.threat_level as u8);
11627        if matches!(version, MavlinkVersion::V2) {
11628            let len = __tmp.len();
11629            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11630        } else {
11631            __tmp.len()
11632        }
11633    }
11634}
11635#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
11636#[doc = ""]
11637#[doc = "ID: 77"]
11638#[derive(Debug, Clone, PartialEq)]
11639#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11640#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11641#[cfg_attr(feature = "ts", derive(TS))]
11642#[cfg_attr(feature = "ts", ts(export))]
11643pub struct COMMAND_ACK_DATA {
11644    #[doc = "Command ID (of acknowledged command)."]
11645    pub command: MavCmd,
11646    #[doc = "Result of command."]
11647    pub result: MavResult,
11648    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
11649    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11650    pub progress: u8,
11651    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
11652    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11653    pub result_param2: i32,
11654    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
11655    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11656    pub target_system: u8,
11657    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
11658    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11659    pub target_component: u8,
11660}
11661impl COMMAND_ACK_DATA {
11662    pub const ENCODED_LEN: usize = 10usize;
11663    pub const DEFAULT: Self = Self {
11664        command: MavCmd::DEFAULT,
11665        result: MavResult::DEFAULT,
11666        progress: 0_u8,
11667        result_param2: 0_i32,
11668        target_system: 0_u8,
11669        target_component: 0_u8,
11670    };
11671    #[cfg(feature = "arbitrary")]
11672    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11673        use arbitrary::{Arbitrary, Unstructured};
11674        let mut buf = [0u8; 1024];
11675        rng.fill_bytes(&mut buf);
11676        let mut unstructured = Unstructured::new(&buf);
11677        Self::arbitrary(&mut unstructured).unwrap_or_default()
11678    }
11679}
11680impl Default for COMMAND_ACK_DATA {
11681    fn default() -> Self {
11682        Self::DEFAULT.clone()
11683    }
11684}
11685impl MessageData for COMMAND_ACK_DATA {
11686    type Message = MavMessage;
11687    const ID: u32 = 77u32;
11688    const NAME: &'static str = "COMMAND_ACK";
11689    const EXTRA_CRC: u8 = 143u8;
11690    const ENCODED_LEN: usize = 10usize;
11691    fn deser(
11692        _version: MavlinkVersion,
11693        __input: &[u8],
11694    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11695        let avail_len = __input.len();
11696        let mut payload_buf = [0; Self::ENCODED_LEN];
11697        let mut buf = if avail_len < Self::ENCODED_LEN {
11698            payload_buf[0..avail_len].copy_from_slice(__input);
11699            Bytes::new(&payload_buf)
11700        } else {
11701            Bytes::new(__input)
11702        };
11703        let mut __struct = Self::default();
11704        let tmp = buf.get_u16_le()?;
11705        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
11706            ::mavlink_core::error::ParserError::InvalidEnum {
11707                enum_type: "MavCmd",
11708                value: tmp as u64,
11709            },
11710        )?;
11711        let tmp = buf.get_u8()?;
11712        __struct.result =
11713            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11714                enum_type: "MavResult",
11715                value: tmp as u64,
11716            })?;
11717        __struct.progress = buf.get_u8()?;
11718        __struct.result_param2 = buf.get_i32_le()?;
11719        __struct.target_system = buf.get_u8()?;
11720        __struct.target_component = buf.get_u8()?;
11721        Ok(__struct)
11722    }
11723    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11724        let mut __tmp = BytesMut::new(bytes);
11725        #[allow(clippy::absurd_extreme_comparisons)]
11726        #[allow(unused_comparisons)]
11727        if __tmp.remaining() < Self::ENCODED_LEN {
11728            panic!(
11729                "buffer is too small (need {} bytes, but got {})",
11730                Self::ENCODED_LEN,
11731                __tmp.remaining(),
11732            )
11733        }
11734        __tmp.put_u16_le(self.command as u16);
11735        __tmp.put_u8(self.result as u8);
11736        if matches!(version, MavlinkVersion::V2) {
11737            __tmp.put_u8(self.progress);
11738            __tmp.put_i32_le(self.result_param2);
11739            __tmp.put_u8(self.target_system);
11740            __tmp.put_u8(self.target_component);
11741            let len = __tmp.len();
11742            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11743        } else {
11744            __tmp.len()
11745        }
11746    }
11747}
11748#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
11749#[doc = ""]
11750#[doc = "ID: 80"]
11751#[derive(Debug, Clone, PartialEq)]
11752#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11753#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11754#[cfg_attr(feature = "ts", derive(TS))]
11755#[cfg_attr(feature = "ts", ts(export))]
11756pub struct COMMAND_CANCEL_DATA {
11757    #[doc = "Command ID (of command to cancel)."]
11758    pub command: MavCmd,
11759    #[doc = "System executing long running command. Should not be broadcast (0)."]
11760    pub target_system: u8,
11761    #[doc = "Component executing long running command."]
11762    pub target_component: u8,
11763}
11764impl COMMAND_CANCEL_DATA {
11765    pub const ENCODED_LEN: usize = 4usize;
11766    pub const DEFAULT: Self = Self {
11767        command: MavCmd::DEFAULT,
11768        target_system: 0_u8,
11769        target_component: 0_u8,
11770    };
11771    #[cfg(feature = "arbitrary")]
11772    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11773        use arbitrary::{Arbitrary, Unstructured};
11774        let mut buf = [0u8; 1024];
11775        rng.fill_bytes(&mut buf);
11776        let mut unstructured = Unstructured::new(&buf);
11777        Self::arbitrary(&mut unstructured).unwrap_or_default()
11778    }
11779}
11780impl Default for COMMAND_CANCEL_DATA {
11781    fn default() -> Self {
11782        Self::DEFAULT.clone()
11783    }
11784}
11785impl MessageData for COMMAND_CANCEL_DATA {
11786    type Message = MavMessage;
11787    const ID: u32 = 80u32;
11788    const NAME: &'static str = "COMMAND_CANCEL";
11789    const EXTRA_CRC: u8 = 14u8;
11790    const ENCODED_LEN: usize = 4usize;
11791    fn deser(
11792        _version: MavlinkVersion,
11793        __input: &[u8],
11794    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11795        let avail_len = __input.len();
11796        let mut payload_buf = [0; Self::ENCODED_LEN];
11797        let mut buf = if avail_len < Self::ENCODED_LEN {
11798            payload_buf[0..avail_len].copy_from_slice(__input);
11799            Bytes::new(&payload_buf)
11800        } else {
11801            Bytes::new(__input)
11802        };
11803        let mut __struct = Self::default();
11804        let tmp = buf.get_u16_le()?;
11805        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
11806            ::mavlink_core::error::ParserError::InvalidEnum {
11807                enum_type: "MavCmd",
11808                value: tmp as u64,
11809            },
11810        )?;
11811        __struct.target_system = buf.get_u8()?;
11812        __struct.target_component = buf.get_u8()?;
11813        Ok(__struct)
11814    }
11815    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11816        let mut __tmp = BytesMut::new(bytes);
11817        #[allow(clippy::absurd_extreme_comparisons)]
11818        #[allow(unused_comparisons)]
11819        if __tmp.remaining() < Self::ENCODED_LEN {
11820            panic!(
11821                "buffer is too small (need {} bytes, but got {})",
11822                Self::ENCODED_LEN,
11823                __tmp.remaining(),
11824            )
11825        }
11826        __tmp.put_u16_le(self.command as u16);
11827        __tmp.put_u8(self.target_system);
11828        __tmp.put_u8(self.target_component);
11829        if matches!(version, MavlinkVersion::V2) {
11830            let len = __tmp.len();
11831            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11832        } else {
11833            __tmp.len()
11834        }
11835    }
11836}
11837#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
11838#[doc = ""]
11839#[doc = "ID: 75"]
11840#[derive(Debug, Clone, PartialEq)]
11841#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11842#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11843#[cfg_attr(feature = "ts", derive(TS))]
11844#[cfg_attr(feature = "ts", ts(export))]
11845pub struct COMMAND_INT_DATA {
11846    #[doc = "PARAM1, see MAV_CMD enum"]
11847    pub param1: f32,
11848    #[doc = "PARAM2, see MAV_CMD enum"]
11849    pub param2: f32,
11850    #[doc = "PARAM3, see MAV_CMD enum"]
11851    pub param3: f32,
11852    #[doc = "PARAM4, see MAV_CMD enum"]
11853    pub param4: f32,
11854    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
11855    pub x: i32,
11856    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
11857    pub y: i32,
11858    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
11859    pub z: f32,
11860    #[doc = "The scheduled action for the mission item."]
11861    pub command: MavCmd,
11862    #[doc = "System ID"]
11863    pub target_system: u8,
11864    #[doc = "Component ID"]
11865    pub target_component: u8,
11866    #[doc = "The coordinate system of the COMMAND."]
11867    pub frame: MavFrame,
11868    #[doc = "Not used."]
11869    pub current: u8,
11870    #[doc = "Not used (set 0)."]
11871    pub autocontinue: u8,
11872}
11873impl COMMAND_INT_DATA {
11874    pub const ENCODED_LEN: usize = 35usize;
11875    pub const DEFAULT: Self = Self {
11876        param1: 0.0_f32,
11877        param2: 0.0_f32,
11878        param3: 0.0_f32,
11879        param4: 0.0_f32,
11880        x: 0_i32,
11881        y: 0_i32,
11882        z: 0.0_f32,
11883        command: MavCmd::DEFAULT,
11884        target_system: 0_u8,
11885        target_component: 0_u8,
11886        frame: MavFrame::DEFAULT,
11887        current: 0_u8,
11888        autocontinue: 0_u8,
11889    };
11890    #[cfg(feature = "arbitrary")]
11891    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11892        use arbitrary::{Arbitrary, Unstructured};
11893        let mut buf = [0u8; 1024];
11894        rng.fill_bytes(&mut buf);
11895        let mut unstructured = Unstructured::new(&buf);
11896        Self::arbitrary(&mut unstructured).unwrap_or_default()
11897    }
11898}
11899impl Default for COMMAND_INT_DATA {
11900    fn default() -> Self {
11901        Self::DEFAULT.clone()
11902    }
11903}
11904impl MessageData for COMMAND_INT_DATA {
11905    type Message = MavMessage;
11906    const ID: u32 = 75u32;
11907    const NAME: &'static str = "COMMAND_INT";
11908    const EXTRA_CRC: u8 = 158u8;
11909    const ENCODED_LEN: usize = 35usize;
11910    fn deser(
11911        _version: MavlinkVersion,
11912        __input: &[u8],
11913    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11914        let avail_len = __input.len();
11915        let mut payload_buf = [0; Self::ENCODED_LEN];
11916        let mut buf = if avail_len < Self::ENCODED_LEN {
11917            payload_buf[0..avail_len].copy_from_slice(__input);
11918            Bytes::new(&payload_buf)
11919        } else {
11920            Bytes::new(__input)
11921        };
11922        let mut __struct = Self::default();
11923        __struct.param1 = buf.get_f32_le()?;
11924        __struct.param2 = buf.get_f32_le()?;
11925        __struct.param3 = buf.get_f32_le()?;
11926        __struct.param4 = buf.get_f32_le()?;
11927        __struct.x = buf.get_i32_le()?;
11928        __struct.y = buf.get_i32_le()?;
11929        __struct.z = buf.get_f32_le()?;
11930        let tmp = buf.get_u16_le()?;
11931        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
11932            ::mavlink_core::error::ParserError::InvalidEnum {
11933                enum_type: "MavCmd",
11934                value: tmp as u64,
11935            },
11936        )?;
11937        __struct.target_system = buf.get_u8()?;
11938        __struct.target_component = buf.get_u8()?;
11939        let tmp = buf.get_u8()?;
11940        __struct.frame =
11941            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11942                enum_type: "MavFrame",
11943                value: tmp as u64,
11944            })?;
11945        __struct.current = buf.get_u8()?;
11946        __struct.autocontinue = buf.get_u8()?;
11947        Ok(__struct)
11948    }
11949    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11950        let mut __tmp = BytesMut::new(bytes);
11951        #[allow(clippy::absurd_extreme_comparisons)]
11952        #[allow(unused_comparisons)]
11953        if __tmp.remaining() < Self::ENCODED_LEN {
11954            panic!(
11955                "buffer is too small (need {} bytes, but got {})",
11956                Self::ENCODED_LEN,
11957                __tmp.remaining(),
11958            )
11959        }
11960        __tmp.put_f32_le(self.param1);
11961        __tmp.put_f32_le(self.param2);
11962        __tmp.put_f32_le(self.param3);
11963        __tmp.put_f32_le(self.param4);
11964        __tmp.put_i32_le(self.x);
11965        __tmp.put_i32_le(self.y);
11966        __tmp.put_f32_le(self.z);
11967        __tmp.put_u16_le(self.command as u16);
11968        __tmp.put_u8(self.target_system);
11969        __tmp.put_u8(self.target_component);
11970        __tmp.put_u8(self.frame as u8);
11971        __tmp.put_u8(self.current);
11972        __tmp.put_u8(self.autocontinue);
11973        if matches!(version, MavlinkVersion::V2) {
11974            let len = __tmp.len();
11975            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11976        } else {
11977            __tmp.len()
11978        }
11979    }
11980}
11981#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
11982#[doc = ""]
11983#[doc = "ID: 76"]
11984#[derive(Debug, Clone, PartialEq)]
11985#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11986#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11987#[cfg_attr(feature = "ts", derive(TS))]
11988#[cfg_attr(feature = "ts", ts(export))]
11989pub struct COMMAND_LONG_DATA {
11990    #[doc = "Parameter 1 (for the specific command)."]
11991    pub param1: f32,
11992    #[doc = "Parameter 2 (for the specific command)."]
11993    pub param2: f32,
11994    #[doc = "Parameter 3 (for the specific command)."]
11995    pub param3: f32,
11996    #[doc = "Parameter 4 (for the specific command)."]
11997    pub param4: f32,
11998    #[doc = "Parameter 5 (for the specific command)."]
11999    pub param5: f32,
12000    #[doc = "Parameter 6 (for the specific command)."]
12001    pub param6: f32,
12002    #[doc = "Parameter 7 (for the specific command)."]
12003    pub param7: f32,
12004    #[doc = "Command ID (of command to send)."]
12005    pub command: MavCmd,
12006    #[doc = "System which should execute the command"]
12007    pub target_system: u8,
12008    #[doc = "Component which should execute the command, 0 for all components"]
12009    pub target_component: u8,
12010    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
12011    pub confirmation: u8,
12012}
12013impl COMMAND_LONG_DATA {
12014    pub const ENCODED_LEN: usize = 33usize;
12015    pub const DEFAULT: Self = Self {
12016        param1: 0.0_f32,
12017        param2: 0.0_f32,
12018        param3: 0.0_f32,
12019        param4: 0.0_f32,
12020        param5: 0.0_f32,
12021        param6: 0.0_f32,
12022        param7: 0.0_f32,
12023        command: MavCmd::DEFAULT,
12024        target_system: 0_u8,
12025        target_component: 0_u8,
12026        confirmation: 0_u8,
12027    };
12028    #[cfg(feature = "arbitrary")]
12029    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12030        use arbitrary::{Arbitrary, Unstructured};
12031        let mut buf = [0u8; 1024];
12032        rng.fill_bytes(&mut buf);
12033        let mut unstructured = Unstructured::new(&buf);
12034        Self::arbitrary(&mut unstructured).unwrap_or_default()
12035    }
12036}
12037impl Default for COMMAND_LONG_DATA {
12038    fn default() -> Self {
12039        Self::DEFAULT.clone()
12040    }
12041}
12042impl MessageData for COMMAND_LONG_DATA {
12043    type Message = MavMessage;
12044    const ID: u32 = 76u32;
12045    const NAME: &'static str = "COMMAND_LONG";
12046    const EXTRA_CRC: u8 = 152u8;
12047    const ENCODED_LEN: usize = 33usize;
12048    fn deser(
12049        _version: MavlinkVersion,
12050        __input: &[u8],
12051    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12052        let avail_len = __input.len();
12053        let mut payload_buf = [0; Self::ENCODED_LEN];
12054        let mut buf = if avail_len < Self::ENCODED_LEN {
12055            payload_buf[0..avail_len].copy_from_slice(__input);
12056            Bytes::new(&payload_buf)
12057        } else {
12058            Bytes::new(__input)
12059        };
12060        let mut __struct = Self::default();
12061        __struct.param1 = buf.get_f32_le()?;
12062        __struct.param2 = buf.get_f32_le()?;
12063        __struct.param3 = buf.get_f32_le()?;
12064        __struct.param4 = buf.get_f32_le()?;
12065        __struct.param5 = buf.get_f32_le()?;
12066        __struct.param6 = buf.get_f32_le()?;
12067        __struct.param7 = buf.get_f32_le()?;
12068        let tmp = buf.get_u16_le()?;
12069        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
12070            ::mavlink_core::error::ParserError::InvalidEnum {
12071                enum_type: "MavCmd",
12072                value: tmp as u64,
12073            },
12074        )?;
12075        __struct.target_system = buf.get_u8()?;
12076        __struct.target_component = buf.get_u8()?;
12077        __struct.confirmation = buf.get_u8()?;
12078        Ok(__struct)
12079    }
12080    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12081        let mut __tmp = BytesMut::new(bytes);
12082        #[allow(clippy::absurd_extreme_comparisons)]
12083        #[allow(unused_comparisons)]
12084        if __tmp.remaining() < Self::ENCODED_LEN {
12085            panic!(
12086                "buffer is too small (need {} bytes, but got {})",
12087                Self::ENCODED_LEN,
12088                __tmp.remaining(),
12089            )
12090        }
12091        __tmp.put_f32_le(self.param1);
12092        __tmp.put_f32_le(self.param2);
12093        __tmp.put_f32_le(self.param3);
12094        __tmp.put_f32_le(self.param4);
12095        __tmp.put_f32_le(self.param5);
12096        __tmp.put_f32_le(self.param6);
12097        __tmp.put_f32_le(self.param7);
12098        __tmp.put_u16_le(self.command as u16);
12099        __tmp.put_u8(self.target_system);
12100        __tmp.put_u8(self.target_component);
12101        __tmp.put_u8(self.confirmation);
12102        if matches!(version, MavlinkVersion::V2) {
12103            let len = __tmp.len();
12104            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12105        } else {
12106            __tmp.len()
12107        }
12108    }
12109}
12110#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
12111#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
12112#[doc = ""]
12113#[doc = "ID: 395"]
12114#[derive(Debug, Clone, PartialEq)]
12115#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12116#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12117#[cfg_attr(feature = "ts", derive(TS))]
12118#[cfg_attr(feature = "ts", ts(export))]
12119pub struct COMPONENT_INFORMATION_DATA {
12120    #[doc = "Timestamp (time since system boot)."]
12121    pub time_boot_ms: u32,
12122    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
12123    pub general_metadata_file_crc: u32,
12124    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
12125    pub peripherals_metadata_file_crc: u32,
12126    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
12127    #[cfg_attr(feature = "ts", ts(type = "string"))]
12128    pub general_metadata_uri: CharArray<100>,
12129    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
12130    #[cfg_attr(feature = "ts", ts(type = "string"))]
12131    pub peripherals_metadata_uri: CharArray<100>,
12132}
12133impl COMPONENT_INFORMATION_DATA {
12134    pub const ENCODED_LEN: usize = 212usize;
12135    pub const DEFAULT: Self = Self {
12136        time_boot_ms: 0_u32,
12137        general_metadata_file_crc: 0_u32,
12138        peripherals_metadata_file_crc: 0_u32,
12139        general_metadata_uri: CharArray::new([0_u8; 100usize]),
12140        peripherals_metadata_uri: CharArray::new([0_u8; 100usize]),
12141    };
12142    #[cfg(feature = "arbitrary")]
12143    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12144        use arbitrary::{Arbitrary, Unstructured};
12145        let mut buf = [0u8; 1024];
12146        rng.fill_bytes(&mut buf);
12147        let mut unstructured = Unstructured::new(&buf);
12148        Self::arbitrary(&mut unstructured).unwrap_or_default()
12149    }
12150}
12151impl Default for COMPONENT_INFORMATION_DATA {
12152    fn default() -> Self {
12153        Self::DEFAULT.clone()
12154    }
12155}
12156impl MessageData for COMPONENT_INFORMATION_DATA {
12157    type Message = MavMessage;
12158    const ID: u32 = 395u32;
12159    const NAME: &'static str = "COMPONENT_INFORMATION";
12160    const EXTRA_CRC: u8 = 0u8;
12161    const ENCODED_LEN: usize = 212usize;
12162    fn deser(
12163        _version: MavlinkVersion,
12164        __input: &[u8],
12165    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12166        let avail_len = __input.len();
12167        let mut payload_buf = [0; Self::ENCODED_LEN];
12168        let mut buf = if avail_len < Self::ENCODED_LEN {
12169            payload_buf[0..avail_len].copy_from_slice(__input);
12170            Bytes::new(&payload_buf)
12171        } else {
12172            Bytes::new(__input)
12173        };
12174        let mut __struct = Self::default();
12175        __struct.time_boot_ms = buf.get_u32_le()?;
12176        __struct.general_metadata_file_crc = buf.get_u32_le()?;
12177        __struct.peripherals_metadata_file_crc = buf.get_u32_le()?;
12178        let mut tmp = [0_u8; 100usize];
12179        for v in &mut tmp {
12180            *v = buf.get_u8()?;
12181        }
12182        __struct.general_metadata_uri = CharArray::new(tmp);
12183        let mut tmp = [0_u8; 100usize];
12184        for v in &mut tmp {
12185            *v = buf.get_u8()?;
12186        }
12187        __struct.peripherals_metadata_uri = CharArray::new(tmp);
12188        Ok(__struct)
12189    }
12190    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12191        let mut __tmp = BytesMut::new(bytes);
12192        #[allow(clippy::absurd_extreme_comparisons)]
12193        #[allow(unused_comparisons)]
12194        if __tmp.remaining() < Self::ENCODED_LEN {
12195            panic!(
12196                "buffer is too small (need {} bytes, but got {})",
12197                Self::ENCODED_LEN,
12198                __tmp.remaining(),
12199            )
12200        }
12201        __tmp.put_u32_le(self.time_boot_ms);
12202        __tmp.put_u32_le(self.general_metadata_file_crc);
12203        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
12204        for val in &self.general_metadata_uri {
12205            __tmp.put_u8(*val);
12206        }
12207        for val in &self.peripherals_metadata_uri {
12208            __tmp.put_u8(*val);
12209        }
12210        if matches!(version, MavlinkVersion::V2) {
12211            let len = __tmp.len();
12212            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12213        } else {
12214            __tmp.len()
12215        }
12216    }
12217}
12218#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
12219#[doc = ""]
12220#[doc = "ID: 396"]
12221#[derive(Debug, Clone, PartialEq)]
12222#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12223#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12224#[cfg_attr(feature = "ts", derive(TS))]
12225#[cfg_attr(feature = "ts", ts(export))]
12226pub struct COMPONENT_INFORMATION_BASIC_DATA {
12227    #[doc = "Component capability flags"]
12228    pub capabilities: MavProtocolCapability,
12229    #[doc = "Timestamp (time since system boot)."]
12230    pub time_boot_ms: u32,
12231    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
12232    pub time_manufacture_s: u32,
12233    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
12234    #[cfg_attr(feature = "ts", ts(type = "string"))]
12235    pub vendor_name: CharArray<32>,
12236    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
12237    #[cfg_attr(feature = "ts", ts(type = "string"))]
12238    pub model_name: CharArray<32>,
12239    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
12240    #[cfg_attr(feature = "ts", ts(type = "string"))]
12241    pub software_version: CharArray<24>,
12242    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
12243    #[cfg_attr(feature = "ts", ts(type = "string"))]
12244    pub hardware_version: CharArray<24>,
12245    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
12246    #[cfg_attr(feature = "ts", ts(type = "string"))]
12247    pub serial_number: CharArray<32>,
12248}
12249impl COMPONENT_INFORMATION_BASIC_DATA {
12250    pub const ENCODED_LEN: usize = 160usize;
12251    pub const DEFAULT: Self = Self {
12252        capabilities: MavProtocolCapability::DEFAULT,
12253        time_boot_ms: 0_u32,
12254        time_manufacture_s: 0_u32,
12255        vendor_name: CharArray::new([0_u8; 32usize]),
12256        model_name: CharArray::new([0_u8; 32usize]),
12257        software_version: CharArray::new([0_u8; 24usize]),
12258        hardware_version: CharArray::new([0_u8; 24usize]),
12259        serial_number: CharArray::new([0_u8; 32usize]),
12260    };
12261    #[cfg(feature = "arbitrary")]
12262    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12263        use arbitrary::{Arbitrary, Unstructured};
12264        let mut buf = [0u8; 1024];
12265        rng.fill_bytes(&mut buf);
12266        let mut unstructured = Unstructured::new(&buf);
12267        Self::arbitrary(&mut unstructured).unwrap_or_default()
12268    }
12269}
12270impl Default for COMPONENT_INFORMATION_BASIC_DATA {
12271    fn default() -> Self {
12272        Self::DEFAULT.clone()
12273    }
12274}
12275impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
12276    type Message = MavMessage;
12277    const ID: u32 = 396u32;
12278    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
12279    const EXTRA_CRC: u8 = 50u8;
12280    const ENCODED_LEN: usize = 160usize;
12281    fn deser(
12282        _version: MavlinkVersion,
12283        __input: &[u8],
12284    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12285        let avail_len = __input.len();
12286        let mut payload_buf = [0; Self::ENCODED_LEN];
12287        let mut buf = if avail_len < Self::ENCODED_LEN {
12288            payload_buf[0..avail_len].copy_from_slice(__input);
12289            Bytes::new(&payload_buf)
12290        } else {
12291            Bytes::new(__input)
12292        };
12293        let mut __struct = Self::default();
12294        let tmp = buf.get_u64_le()?;
12295        __struct.capabilities = MavProtocolCapability::from_bits(
12296            tmp as <MavProtocolCapability as Flags>::Bits,
12297        )
12298        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12299            flag_type: "MavProtocolCapability",
12300            value: tmp as u64,
12301        })?;
12302        __struct.time_boot_ms = buf.get_u32_le()?;
12303        __struct.time_manufacture_s = buf.get_u32_le()?;
12304        let mut tmp = [0_u8; 32usize];
12305        for v in &mut tmp {
12306            *v = buf.get_u8()?;
12307        }
12308        __struct.vendor_name = CharArray::new(tmp);
12309        let mut tmp = [0_u8; 32usize];
12310        for v in &mut tmp {
12311            *v = buf.get_u8()?;
12312        }
12313        __struct.model_name = CharArray::new(tmp);
12314        let mut tmp = [0_u8; 24usize];
12315        for v in &mut tmp {
12316            *v = buf.get_u8()?;
12317        }
12318        __struct.software_version = CharArray::new(tmp);
12319        let mut tmp = [0_u8; 24usize];
12320        for v in &mut tmp {
12321            *v = buf.get_u8()?;
12322        }
12323        __struct.hardware_version = CharArray::new(tmp);
12324        let mut tmp = [0_u8; 32usize];
12325        for v in &mut tmp {
12326            *v = buf.get_u8()?;
12327        }
12328        __struct.serial_number = CharArray::new(tmp);
12329        Ok(__struct)
12330    }
12331    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12332        let mut __tmp = BytesMut::new(bytes);
12333        #[allow(clippy::absurd_extreme_comparisons)]
12334        #[allow(unused_comparisons)]
12335        if __tmp.remaining() < Self::ENCODED_LEN {
12336            panic!(
12337                "buffer is too small (need {} bytes, but got {})",
12338                Self::ENCODED_LEN,
12339                __tmp.remaining(),
12340            )
12341        }
12342        __tmp.put_u64_le(self.capabilities.bits() as u64);
12343        __tmp.put_u32_le(self.time_boot_ms);
12344        __tmp.put_u32_le(self.time_manufacture_s);
12345        for val in &self.vendor_name {
12346            __tmp.put_u8(*val);
12347        }
12348        for val in &self.model_name {
12349            __tmp.put_u8(*val);
12350        }
12351        for val in &self.software_version {
12352            __tmp.put_u8(*val);
12353        }
12354        for val in &self.hardware_version {
12355            __tmp.put_u8(*val);
12356        }
12357        for val in &self.serial_number {
12358            __tmp.put_u8(*val);
12359        }
12360        if matches!(version, MavlinkVersion::V2) {
12361            let len = __tmp.len();
12362            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12363        } else {
12364            __tmp.len()
12365        }
12366    }
12367}
12368#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
12369#[doc = ""]
12370#[doc = "ID: 397"]
12371#[derive(Debug, Clone, PartialEq)]
12372#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12373#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12374#[cfg_attr(feature = "ts", derive(TS))]
12375#[cfg_attr(feature = "ts", ts(export))]
12376pub struct COMPONENT_METADATA_DATA {
12377    #[doc = "Timestamp (time since system boot)."]
12378    pub time_boot_ms: u32,
12379    #[doc = "CRC32 of the general metadata file."]
12380    pub file_crc: u32,
12381    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
12382    #[cfg_attr(feature = "ts", ts(type = "string"))]
12383    pub uri: CharArray<100>,
12384}
12385impl COMPONENT_METADATA_DATA {
12386    pub const ENCODED_LEN: usize = 108usize;
12387    pub const DEFAULT: Self = Self {
12388        time_boot_ms: 0_u32,
12389        file_crc: 0_u32,
12390        uri: CharArray::new([0_u8; 100usize]),
12391    };
12392    #[cfg(feature = "arbitrary")]
12393    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12394        use arbitrary::{Arbitrary, Unstructured};
12395        let mut buf = [0u8; 1024];
12396        rng.fill_bytes(&mut buf);
12397        let mut unstructured = Unstructured::new(&buf);
12398        Self::arbitrary(&mut unstructured).unwrap_or_default()
12399    }
12400}
12401impl Default for COMPONENT_METADATA_DATA {
12402    fn default() -> Self {
12403        Self::DEFAULT.clone()
12404    }
12405}
12406impl MessageData for COMPONENT_METADATA_DATA {
12407    type Message = MavMessage;
12408    const ID: u32 = 397u32;
12409    const NAME: &'static str = "COMPONENT_METADATA";
12410    const EXTRA_CRC: u8 = 182u8;
12411    const ENCODED_LEN: usize = 108usize;
12412    fn deser(
12413        _version: MavlinkVersion,
12414        __input: &[u8],
12415    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12416        let avail_len = __input.len();
12417        let mut payload_buf = [0; Self::ENCODED_LEN];
12418        let mut buf = if avail_len < Self::ENCODED_LEN {
12419            payload_buf[0..avail_len].copy_from_slice(__input);
12420            Bytes::new(&payload_buf)
12421        } else {
12422            Bytes::new(__input)
12423        };
12424        let mut __struct = Self::default();
12425        __struct.time_boot_ms = buf.get_u32_le()?;
12426        __struct.file_crc = buf.get_u32_le()?;
12427        let mut tmp = [0_u8; 100usize];
12428        for v in &mut tmp {
12429            *v = buf.get_u8()?;
12430        }
12431        __struct.uri = CharArray::new(tmp);
12432        Ok(__struct)
12433    }
12434    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12435        let mut __tmp = BytesMut::new(bytes);
12436        #[allow(clippy::absurd_extreme_comparisons)]
12437        #[allow(unused_comparisons)]
12438        if __tmp.remaining() < Self::ENCODED_LEN {
12439            panic!(
12440                "buffer is too small (need {} bytes, but got {})",
12441                Self::ENCODED_LEN,
12442                __tmp.remaining(),
12443            )
12444        }
12445        __tmp.put_u32_le(self.time_boot_ms);
12446        __tmp.put_u32_le(self.file_crc);
12447        for val in &self.uri {
12448            __tmp.put_u8(*val);
12449        }
12450        if matches!(version, MavlinkVersion::V2) {
12451            let len = __tmp.len();
12452            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12453        } else {
12454            __tmp.len()
12455        }
12456    }
12457}
12458#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
12459#[doc = ""]
12460#[doc = "ID: 146"]
12461#[derive(Debug, Clone, PartialEq)]
12462#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12463#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12464#[cfg_attr(feature = "ts", derive(TS))]
12465#[cfg_attr(feature = "ts", ts(export))]
12466pub struct CONTROL_SYSTEM_STATE_DATA {
12467    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
12468    pub time_usec: u64,
12469    #[doc = "X acceleration in body frame"]
12470    pub x_acc: f32,
12471    #[doc = "Y acceleration in body frame"]
12472    pub y_acc: f32,
12473    #[doc = "Z acceleration in body frame"]
12474    pub z_acc: f32,
12475    #[doc = "X velocity in body frame"]
12476    pub x_vel: f32,
12477    #[doc = "Y velocity in body frame"]
12478    pub y_vel: f32,
12479    #[doc = "Z velocity in body frame"]
12480    pub z_vel: f32,
12481    #[doc = "X position in local frame"]
12482    pub x_pos: f32,
12483    #[doc = "Y position in local frame"]
12484    pub y_pos: f32,
12485    #[doc = "Z position in local frame"]
12486    pub z_pos: f32,
12487    #[doc = "Airspeed, set to -1 if unknown"]
12488    pub airspeed: f32,
12489    #[doc = "Variance of body velocity estimate"]
12490    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12491    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12492    pub vel_variance: [f32; 3],
12493    #[doc = "Variance in local position"]
12494    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12495    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12496    pub pos_variance: [f32; 3],
12497    #[doc = "The attitude, represented as Quaternion"]
12498    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12499    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12500    pub q: [f32; 4],
12501    #[doc = "Angular rate in roll axis"]
12502    pub roll_rate: f32,
12503    #[doc = "Angular rate in pitch axis"]
12504    pub pitch_rate: f32,
12505    #[doc = "Angular rate in yaw axis"]
12506    pub yaw_rate: f32,
12507}
12508impl CONTROL_SYSTEM_STATE_DATA {
12509    pub const ENCODED_LEN: usize = 100usize;
12510    pub const DEFAULT: Self = Self {
12511        time_usec: 0_u64,
12512        x_acc: 0.0_f32,
12513        y_acc: 0.0_f32,
12514        z_acc: 0.0_f32,
12515        x_vel: 0.0_f32,
12516        y_vel: 0.0_f32,
12517        z_vel: 0.0_f32,
12518        x_pos: 0.0_f32,
12519        y_pos: 0.0_f32,
12520        z_pos: 0.0_f32,
12521        airspeed: 0.0_f32,
12522        vel_variance: [0.0_f32; 3usize],
12523        pos_variance: [0.0_f32; 3usize],
12524        q: [0.0_f32; 4usize],
12525        roll_rate: 0.0_f32,
12526        pitch_rate: 0.0_f32,
12527        yaw_rate: 0.0_f32,
12528    };
12529    #[cfg(feature = "arbitrary")]
12530    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12531        use arbitrary::{Arbitrary, Unstructured};
12532        let mut buf = [0u8; 1024];
12533        rng.fill_bytes(&mut buf);
12534        let mut unstructured = Unstructured::new(&buf);
12535        Self::arbitrary(&mut unstructured).unwrap_or_default()
12536    }
12537}
12538impl Default for CONTROL_SYSTEM_STATE_DATA {
12539    fn default() -> Self {
12540        Self::DEFAULT.clone()
12541    }
12542}
12543impl MessageData for CONTROL_SYSTEM_STATE_DATA {
12544    type Message = MavMessage;
12545    const ID: u32 = 146u32;
12546    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
12547    const EXTRA_CRC: u8 = 103u8;
12548    const ENCODED_LEN: usize = 100usize;
12549    fn deser(
12550        _version: MavlinkVersion,
12551        __input: &[u8],
12552    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12553        let avail_len = __input.len();
12554        let mut payload_buf = [0; Self::ENCODED_LEN];
12555        let mut buf = if avail_len < Self::ENCODED_LEN {
12556            payload_buf[0..avail_len].copy_from_slice(__input);
12557            Bytes::new(&payload_buf)
12558        } else {
12559            Bytes::new(__input)
12560        };
12561        let mut __struct = Self::default();
12562        __struct.time_usec = buf.get_u64_le()?;
12563        __struct.x_acc = buf.get_f32_le()?;
12564        __struct.y_acc = buf.get_f32_le()?;
12565        __struct.z_acc = buf.get_f32_le()?;
12566        __struct.x_vel = buf.get_f32_le()?;
12567        __struct.y_vel = buf.get_f32_le()?;
12568        __struct.z_vel = buf.get_f32_le()?;
12569        __struct.x_pos = buf.get_f32_le()?;
12570        __struct.y_pos = buf.get_f32_le()?;
12571        __struct.z_pos = buf.get_f32_le()?;
12572        __struct.airspeed = buf.get_f32_le()?;
12573        for v in &mut __struct.vel_variance {
12574            let val = buf.get_f32_le()?;
12575            *v = val;
12576        }
12577        for v in &mut __struct.pos_variance {
12578            let val = buf.get_f32_le()?;
12579            *v = val;
12580        }
12581        for v in &mut __struct.q {
12582            let val = buf.get_f32_le()?;
12583            *v = val;
12584        }
12585        __struct.roll_rate = buf.get_f32_le()?;
12586        __struct.pitch_rate = buf.get_f32_le()?;
12587        __struct.yaw_rate = buf.get_f32_le()?;
12588        Ok(__struct)
12589    }
12590    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12591        let mut __tmp = BytesMut::new(bytes);
12592        #[allow(clippy::absurd_extreme_comparisons)]
12593        #[allow(unused_comparisons)]
12594        if __tmp.remaining() < Self::ENCODED_LEN {
12595            panic!(
12596                "buffer is too small (need {} bytes, but got {})",
12597                Self::ENCODED_LEN,
12598                __tmp.remaining(),
12599            )
12600        }
12601        __tmp.put_u64_le(self.time_usec);
12602        __tmp.put_f32_le(self.x_acc);
12603        __tmp.put_f32_le(self.y_acc);
12604        __tmp.put_f32_le(self.z_acc);
12605        __tmp.put_f32_le(self.x_vel);
12606        __tmp.put_f32_le(self.y_vel);
12607        __tmp.put_f32_le(self.z_vel);
12608        __tmp.put_f32_le(self.x_pos);
12609        __tmp.put_f32_le(self.y_pos);
12610        __tmp.put_f32_le(self.z_pos);
12611        __tmp.put_f32_le(self.airspeed);
12612        for val in &self.vel_variance {
12613            __tmp.put_f32_le(*val);
12614        }
12615        for val in &self.pos_variance {
12616            __tmp.put_f32_le(*val);
12617        }
12618        for val in &self.q {
12619            __tmp.put_f32_le(*val);
12620        }
12621        __tmp.put_f32_le(self.roll_rate);
12622        __tmp.put_f32_le(self.pitch_rate);
12623        __tmp.put_f32_le(self.yaw_rate);
12624        if matches!(version, MavlinkVersion::V2) {
12625            let len = __tmp.len();
12626            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12627        } else {
12628            __tmp.len()
12629        }
12630    }
12631}
12632#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
12633#[doc = ""]
12634#[doc = "ID: 411"]
12635#[derive(Debug, Clone, PartialEq)]
12636#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12637#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12638#[cfg_attr(feature = "ts", derive(TS))]
12639#[cfg_attr(feature = "ts", ts(export))]
12640pub struct CURRENT_EVENT_SEQUENCE_DATA {
12641    #[doc = "Sequence number."]
12642    pub sequence: u16,
12643    #[doc = "Flag bitset."]
12644    pub flags: MavEventCurrentSequenceFlags,
12645}
12646impl CURRENT_EVENT_SEQUENCE_DATA {
12647    pub const ENCODED_LEN: usize = 3usize;
12648    pub const DEFAULT: Self = Self {
12649        sequence: 0_u16,
12650        flags: MavEventCurrentSequenceFlags::DEFAULT,
12651    };
12652    #[cfg(feature = "arbitrary")]
12653    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12654        use arbitrary::{Arbitrary, Unstructured};
12655        let mut buf = [0u8; 1024];
12656        rng.fill_bytes(&mut buf);
12657        let mut unstructured = Unstructured::new(&buf);
12658        Self::arbitrary(&mut unstructured).unwrap_or_default()
12659    }
12660}
12661impl Default for CURRENT_EVENT_SEQUENCE_DATA {
12662    fn default() -> Self {
12663        Self::DEFAULT.clone()
12664    }
12665}
12666impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
12667    type Message = MavMessage;
12668    const ID: u32 = 411u32;
12669    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
12670    const EXTRA_CRC: u8 = 106u8;
12671    const ENCODED_LEN: usize = 3usize;
12672    fn deser(
12673        _version: MavlinkVersion,
12674        __input: &[u8],
12675    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12676        let avail_len = __input.len();
12677        let mut payload_buf = [0; Self::ENCODED_LEN];
12678        let mut buf = if avail_len < Self::ENCODED_LEN {
12679            payload_buf[0..avail_len].copy_from_slice(__input);
12680            Bytes::new(&payload_buf)
12681        } else {
12682            Bytes::new(__input)
12683        };
12684        let mut __struct = Self::default();
12685        __struct.sequence = buf.get_u16_le()?;
12686        let tmp = buf.get_u8()?;
12687        __struct.flags =
12688            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12689                enum_type: "MavEventCurrentSequenceFlags",
12690                value: tmp as u64,
12691            })?;
12692        Ok(__struct)
12693    }
12694    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12695        let mut __tmp = BytesMut::new(bytes);
12696        #[allow(clippy::absurd_extreme_comparisons)]
12697        #[allow(unused_comparisons)]
12698        if __tmp.remaining() < Self::ENCODED_LEN {
12699            panic!(
12700                "buffer is too small (need {} bytes, but got {})",
12701                Self::ENCODED_LEN,
12702                __tmp.remaining(),
12703            )
12704        }
12705        __tmp.put_u16_le(self.sequence);
12706        __tmp.put_u8(self.flags as u8);
12707        if matches!(version, MavlinkVersion::V2) {
12708            let len = __tmp.len();
12709            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12710        } else {
12711            __tmp.len()
12712        }
12713    }
12714}
12715#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
12716#[doc = ""]
12717#[doc = "ID: 436"]
12718#[derive(Debug, Clone, PartialEq)]
12719#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12720#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12721#[cfg_attr(feature = "ts", derive(TS))]
12722#[cfg_attr(feature = "ts", ts(export))]
12723pub struct CURRENT_MODE_DATA {
12724    #[doc = "A bitfield for use for autopilot-specific flags"]
12725    pub custom_mode: u32,
12726    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
12727    pub intended_custom_mode: u32,
12728    #[doc = "Standard mode."]
12729    pub standard_mode: MavStandardMode,
12730}
12731impl CURRENT_MODE_DATA {
12732    pub const ENCODED_LEN: usize = 9usize;
12733    pub const DEFAULT: Self = Self {
12734        custom_mode: 0_u32,
12735        intended_custom_mode: 0_u32,
12736        standard_mode: MavStandardMode::DEFAULT,
12737    };
12738    #[cfg(feature = "arbitrary")]
12739    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12740        use arbitrary::{Arbitrary, Unstructured};
12741        let mut buf = [0u8; 1024];
12742        rng.fill_bytes(&mut buf);
12743        let mut unstructured = Unstructured::new(&buf);
12744        Self::arbitrary(&mut unstructured).unwrap_or_default()
12745    }
12746}
12747impl Default for CURRENT_MODE_DATA {
12748    fn default() -> Self {
12749        Self::DEFAULT.clone()
12750    }
12751}
12752impl MessageData for CURRENT_MODE_DATA {
12753    type Message = MavMessage;
12754    const ID: u32 = 436u32;
12755    const NAME: &'static str = "CURRENT_MODE";
12756    const EXTRA_CRC: u8 = 193u8;
12757    const ENCODED_LEN: usize = 9usize;
12758    fn deser(
12759        _version: MavlinkVersion,
12760        __input: &[u8],
12761    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12762        let avail_len = __input.len();
12763        let mut payload_buf = [0; Self::ENCODED_LEN];
12764        let mut buf = if avail_len < Self::ENCODED_LEN {
12765            payload_buf[0..avail_len].copy_from_slice(__input);
12766            Bytes::new(&payload_buf)
12767        } else {
12768            Bytes::new(__input)
12769        };
12770        let mut __struct = Self::default();
12771        __struct.custom_mode = buf.get_u32_le()?;
12772        __struct.intended_custom_mode = buf.get_u32_le()?;
12773        let tmp = buf.get_u8()?;
12774        __struct.standard_mode =
12775            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12776                enum_type: "MavStandardMode",
12777                value: tmp as u64,
12778            })?;
12779        Ok(__struct)
12780    }
12781    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12782        let mut __tmp = BytesMut::new(bytes);
12783        #[allow(clippy::absurd_extreme_comparisons)]
12784        #[allow(unused_comparisons)]
12785        if __tmp.remaining() < Self::ENCODED_LEN {
12786            panic!(
12787                "buffer is too small (need {} bytes, but got {})",
12788                Self::ENCODED_LEN,
12789                __tmp.remaining(),
12790            )
12791        }
12792        __tmp.put_u32_le(self.custom_mode);
12793        __tmp.put_u32_le(self.intended_custom_mode);
12794        __tmp.put_u8(self.standard_mode as u8);
12795        if matches!(version, MavlinkVersion::V2) {
12796            let len = __tmp.len();
12797            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12798        } else {
12799            __tmp.len()
12800        }
12801    }
12802}
12803#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
12804#[doc = "Data stream status information."]
12805#[doc = ""]
12806#[doc = "ID: 67"]
12807#[derive(Debug, Clone, PartialEq)]
12808#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12809#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12810#[cfg_attr(feature = "ts", derive(TS))]
12811#[cfg_attr(feature = "ts", ts(export))]
12812pub struct DATA_STREAM_DATA {
12813    #[doc = "The message rate"]
12814    pub message_rate: u16,
12815    #[doc = "The ID of the requested data stream"]
12816    pub stream_id: u8,
12817    #[doc = "1 stream is enabled, 0 stream is stopped."]
12818    pub on_off: u8,
12819}
12820impl DATA_STREAM_DATA {
12821    pub const ENCODED_LEN: usize = 4usize;
12822    pub const DEFAULT: Self = Self {
12823        message_rate: 0_u16,
12824        stream_id: 0_u8,
12825        on_off: 0_u8,
12826    };
12827    #[cfg(feature = "arbitrary")]
12828    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12829        use arbitrary::{Arbitrary, Unstructured};
12830        let mut buf = [0u8; 1024];
12831        rng.fill_bytes(&mut buf);
12832        let mut unstructured = Unstructured::new(&buf);
12833        Self::arbitrary(&mut unstructured).unwrap_or_default()
12834    }
12835}
12836impl Default for DATA_STREAM_DATA {
12837    fn default() -> Self {
12838        Self::DEFAULT.clone()
12839    }
12840}
12841impl MessageData for DATA_STREAM_DATA {
12842    type Message = MavMessage;
12843    const ID: u32 = 67u32;
12844    const NAME: &'static str = "DATA_STREAM";
12845    const EXTRA_CRC: u8 = 21u8;
12846    const ENCODED_LEN: usize = 4usize;
12847    fn deser(
12848        _version: MavlinkVersion,
12849        __input: &[u8],
12850    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12851        let avail_len = __input.len();
12852        let mut payload_buf = [0; Self::ENCODED_LEN];
12853        let mut buf = if avail_len < Self::ENCODED_LEN {
12854            payload_buf[0..avail_len].copy_from_slice(__input);
12855            Bytes::new(&payload_buf)
12856        } else {
12857            Bytes::new(__input)
12858        };
12859        let mut __struct = Self::default();
12860        __struct.message_rate = buf.get_u16_le()?;
12861        __struct.stream_id = buf.get_u8()?;
12862        __struct.on_off = buf.get_u8()?;
12863        Ok(__struct)
12864    }
12865    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12866        let mut __tmp = BytesMut::new(bytes);
12867        #[allow(clippy::absurd_extreme_comparisons)]
12868        #[allow(unused_comparisons)]
12869        if __tmp.remaining() < Self::ENCODED_LEN {
12870            panic!(
12871                "buffer is too small (need {} bytes, but got {})",
12872                Self::ENCODED_LEN,
12873                __tmp.remaining(),
12874            )
12875        }
12876        __tmp.put_u16_le(self.message_rate);
12877        __tmp.put_u8(self.stream_id);
12878        __tmp.put_u8(self.on_off);
12879        if matches!(version, MavlinkVersion::V2) {
12880            let len = __tmp.len();
12881            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12882        } else {
12883            __tmp.len()
12884        }
12885    }
12886}
12887#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
12888#[doc = ""]
12889#[doc = "ID: 130"]
12890#[derive(Debug, Clone, PartialEq)]
12891#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12892#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12893#[cfg_attr(feature = "ts", derive(TS))]
12894#[cfg_attr(feature = "ts", ts(export))]
12895pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
12896    #[doc = "total data size (set on ACK only)."]
12897    pub size: u32,
12898    #[doc = "Width of a matrix or image."]
12899    pub width: u16,
12900    #[doc = "Height of a matrix or image."]
12901    pub height: u16,
12902    #[doc = "Number of packets being sent (set on ACK only)."]
12903    pub packets: u16,
12904    #[doc = "Type of requested/acknowledged data."]
12905    pub mavtype: MavlinkDataStreamType,
12906    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
12907    pub payload: u8,
12908    #[doc = "JPEG quality. Values: [1-100]."]
12909    pub jpg_quality: u8,
12910}
12911impl DATA_TRANSMISSION_HANDSHAKE_DATA {
12912    pub const ENCODED_LEN: usize = 13usize;
12913    pub const DEFAULT: Self = Self {
12914        size: 0_u32,
12915        width: 0_u16,
12916        height: 0_u16,
12917        packets: 0_u16,
12918        mavtype: MavlinkDataStreamType::DEFAULT,
12919        payload: 0_u8,
12920        jpg_quality: 0_u8,
12921    };
12922    #[cfg(feature = "arbitrary")]
12923    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12924        use arbitrary::{Arbitrary, Unstructured};
12925        let mut buf = [0u8; 1024];
12926        rng.fill_bytes(&mut buf);
12927        let mut unstructured = Unstructured::new(&buf);
12928        Self::arbitrary(&mut unstructured).unwrap_or_default()
12929    }
12930}
12931impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
12932    fn default() -> Self {
12933        Self::DEFAULT.clone()
12934    }
12935}
12936impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
12937    type Message = MavMessage;
12938    const ID: u32 = 130u32;
12939    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
12940    const EXTRA_CRC: u8 = 29u8;
12941    const ENCODED_LEN: usize = 13usize;
12942    fn deser(
12943        _version: MavlinkVersion,
12944        __input: &[u8],
12945    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12946        let avail_len = __input.len();
12947        let mut payload_buf = [0; Self::ENCODED_LEN];
12948        let mut buf = if avail_len < Self::ENCODED_LEN {
12949            payload_buf[0..avail_len].copy_from_slice(__input);
12950            Bytes::new(&payload_buf)
12951        } else {
12952            Bytes::new(__input)
12953        };
12954        let mut __struct = Self::default();
12955        __struct.size = buf.get_u32_le()?;
12956        __struct.width = buf.get_u16_le()?;
12957        __struct.height = buf.get_u16_le()?;
12958        __struct.packets = buf.get_u16_le()?;
12959        let tmp = buf.get_u8()?;
12960        __struct.mavtype =
12961            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12962                enum_type: "MavlinkDataStreamType",
12963                value: tmp as u64,
12964            })?;
12965        __struct.payload = buf.get_u8()?;
12966        __struct.jpg_quality = buf.get_u8()?;
12967        Ok(__struct)
12968    }
12969    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12970        let mut __tmp = BytesMut::new(bytes);
12971        #[allow(clippy::absurd_extreme_comparisons)]
12972        #[allow(unused_comparisons)]
12973        if __tmp.remaining() < Self::ENCODED_LEN {
12974            panic!(
12975                "buffer is too small (need {} bytes, but got {})",
12976                Self::ENCODED_LEN,
12977                __tmp.remaining(),
12978            )
12979        }
12980        __tmp.put_u32_le(self.size);
12981        __tmp.put_u16_le(self.width);
12982        __tmp.put_u16_le(self.height);
12983        __tmp.put_u16_le(self.packets);
12984        __tmp.put_u8(self.mavtype as u8);
12985        __tmp.put_u8(self.payload);
12986        __tmp.put_u8(self.jpg_quality);
12987        if matches!(version, MavlinkVersion::V2) {
12988            let len = __tmp.len();
12989            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12990        } else {
12991            __tmp.len()
12992        }
12993    }
12994}
12995#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
12996#[doc = ""]
12997#[doc = "ID: 254"]
12998#[derive(Debug, Clone, PartialEq)]
12999#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13000#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13001#[cfg_attr(feature = "ts", derive(TS))]
13002#[cfg_attr(feature = "ts", ts(export))]
13003pub struct DEBUG_DATA {
13004    #[doc = "Timestamp (time since system boot)."]
13005    pub time_boot_ms: u32,
13006    #[doc = "DEBUG value"]
13007    pub value: f32,
13008    #[doc = "index of debug variable"]
13009    pub ind: u8,
13010}
13011impl DEBUG_DATA {
13012    pub const ENCODED_LEN: usize = 9usize;
13013    pub const DEFAULT: Self = Self {
13014        time_boot_ms: 0_u32,
13015        value: 0.0_f32,
13016        ind: 0_u8,
13017    };
13018    #[cfg(feature = "arbitrary")]
13019    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13020        use arbitrary::{Arbitrary, Unstructured};
13021        let mut buf = [0u8; 1024];
13022        rng.fill_bytes(&mut buf);
13023        let mut unstructured = Unstructured::new(&buf);
13024        Self::arbitrary(&mut unstructured).unwrap_or_default()
13025    }
13026}
13027impl Default for DEBUG_DATA {
13028    fn default() -> Self {
13029        Self::DEFAULT.clone()
13030    }
13031}
13032impl MessageData for DEBUG_DATA {
13033    type Message = MavMessage;
13034    const ID: u32 = 254u32;
13035    const NAME: &'static str = "DEBUG";
13036    const EXTRA_CRC: u8 = 46u8;
13037    const ENCODED_LEN: usize = 9usize;
13038    fn deser(
13039        _version: MavlinkVersion,
13040        __input: &[u8],
13041    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13042        let avail_len = __input.len();
13043        let mut payload_buf = [0; Self::ENCODED_LEN];
13044        let mut buf = if avail_len < Self::ENCODED_LEN {
13045            payload_buf[0..avail_len].copy_from_slice(__input);
13046            Bytes::new(&payload_buf)
13047        } else {
13048            Bytes::new(__input)
13049        };
13050        let mut __struct = Self::default();
13051        __struct.time_boot_ms = buf.get_u32_le()?;
13052        __struct.value = buf.get_f32_le()?;
13053        __struct.ind = buf.get_u8()?;
13054        Ok(__struct)
13055    }
13056    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13057        let mut __tmp = BytesMut::new(bytes);
13058        #[allow(clippy::absurd_extreme_comparisons)]
13059        #[allow(unused_comparisons)]
13060        if __tmp.remaining() < Self::ENCODED_LEN {
13061            panic!(
13062                "buffer is too small (need {} bytes, but got {})",
13063                Self::ENCODED_LEN,
13064                __tmp.remaining(),
13065            )
13066        }
13067        __tmp.put_u32_le(self.time_boot_ms);
13068        __tmp.put_f32_le(self.value);
13069        __tmp.put_u8(self.ind);
13070        if matches!(version, MavlinkVersion::V2) {
13071            let len = __tmp.len();
13072            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13073        } else {
13074            __tmp.len()
13075        }
13076    }
13077}
13078#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
13079#[doc = ""]
13080#[doc = "ID: 350"]
13081#[derive(Debug, Clone, PartialEq)]
13082#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13083#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13084#[cfg_attr(feature = "ts", derive(TS))]
13085#[cfg_attr(feature = "ts", ts(export))]
13086pub struct DEBUG_FLOAT_ARRAY_DATA {
13087    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13088    pub time_usec: u64,
13089    #[doc = "Unique ID used to discriminate between arrays"]
13090    pub array_id: u16,
13091    #[doc = "Name, for human-friendly display in a Ground Control Station"]
13092    #[cfg_attr(feature = "ts", ts(type = "string"))]
13093    pub name: CharArray<10>,
13094    #[doc = "data"]
13095    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13096    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13097    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13098    pub data: [f32; 58],
13099}
13100impl DEBUG_FLOAT_ARRAY_DATA {
13101    pub const ENCODED_LEN: usize = 252usize;
13102    pub const DEFAULT: Self = Self {
13103        time_usec: 0_u64,
13104        array_id: 0_u16,
13105        name: CharArray::new([0_u8; 10usize]),
13106        data: [0.0_f32; 58usize],
13107    };
13108    #[cfg(feature = "arbitrary")]
13109    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13110        use arbitrary::{Arbitrary, Unstructured};
13111        let mut buf = [0u8; 1024];
13112        rng.fill_bytes(&mut buf);
13113        let mut unstructured = Unstructured::new(&buf);
13114        Self::arbitrary(&mut unstructured).unwrap_or_default()
13115    }
13116}
13117impl Default for DEBUG_FLOAT_ARRAY_DATA {
13118    fn default() -> Self {
13119        Self::DEFAULT.clone()
13120    }
13121}
13122impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
13123    type Message = MavMessage;
13124    const ID: u32 = 350u32;
13125    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
13126    const EXTRA_CRC: u8 = 232u8;
13127    const ENCODED_LEN: usize = 252usize;
13128    fn deser(
13129        _version: MavlinkVersion,
13130        __input: &[u8],
13131    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13132        let avail_len = __input.len();
13133        let mut payload_buf = [0; Self::ENCODED_LEN];
13134        let mut buf = if avail_len < Self::ENCODED_LEN {
13135            payload_buf[0..avail_len].copy_from_slice(__input);
13136            Bytes::new(&payload_buf)
13137        } else {
13138            Bytes::new(__input)
13139        };
13140        let mut __struct = Self::default();
13141        __struct.time_usec = buf.get_u64_le()?;
13142        __struct.array_id = buf.get_u16_le()?;
13143        let mut tmp = [0_u8; 10usize];
13144        for v in &mut tmp {
13145            *v = buf.get_u8()?;
13146        }
13147        __struct.name = CharArray::new(tmp);
13148        for v in &mut __struct.data {
13149            let val = buf.get_f32_le()?;
13150            *v = val;
13151        }
13152        Ok(__struct)
13153    }
13154    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13155        let mut __tmp = BytesMut::new(bytes);
13156        #[allow(clippy::absurd_extreme_comparisons)]
13157        #[allow(unused_comparisons)]
13158        if __tmp.remaining() < Self::ENCODED_LEN {
13159            panic!(
13160                "buffer is too small (need {} bytes, but got {})",
13161                Self::ENCODED_LEN,
13162                __tmp.remaining(),
13163            )
13164        }
13165        __tmp.put_u64_le(self.time_usec);
13166        __tmp.put_u16_le(self.array_id);
13167        for val in &self.name {
13168            __tmp.put_u8(*val);
13169        }
13170        if matches!(version, MavlinkVersion::V2) {
13171            for val in &self.data {
13172                __tmp.put_f32_le(*val);
13173            }
13174            let len = __tmp.len();
13175            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13176        } else {
13177            __tmp.len()
13178        }
13179    }
13180}
13181#[doc = "To debug something using a named 3D vector."]
13182#[doc = ""]
13183#[doc = "ID: 250"]
13184#[derive(Debug, Clone, PartialEq)]
13185#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13186#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13187#[cfg_attr(feature = "ts", derive(TS))]
13188#[cfg_attr(feature = "ts", ts(export))]
13189pub struct DEBUG_VECT_DATA {
13190    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13191    pub time_usec: u64,
13192    #[doc = "x"]
13193    pub x: f32,
13194    #[doc = "y"]
13195    pub y: f32,
13196    #[doc = "z"]
13197    pub z: f32,
13198    #[doc = "Name"]
13199    #[cfg_attr(feature = "ts", ts(type = "string"))]
13200    pub name: CharArray<10>,
13201}
13202impl DEBUG_VECT_DATA {
13203    pub const ENCODED_LEN: usize = 30usize;
13204    pub const DEFAULT: Self = Self {
13205        time_usec: 0_u64,
13206        x: 0.0_f32,
13207        y: 0.0_f32,
13208        z: 0.0_f32,
13209        name: CharArray::new([0_u8; 10usize]),
13210    };
13211    #[cfg(feature = "arbitrary")]
13212    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13213        use arbitrary::{Arbitrary, Unstructured};
13214        let mut buf = [0u8; 1024];
13215        rng.fill_bytes(&mut buf);
13216        let mut unstructured = Unstructured::new(&buf);
13217        Self::arbitrary(&mut unstructured).unwrap_or_default()
13218    }
13219}
13220impl Default for DEBUG_VECT_DATA {
13221    fn default() -> Self {
13222        Self::DEFAULT.clone()
13223    }
13224}
13225impl MessageData for DEBUG_VECT_DATA {
13226    type Message = MavMessage;
13227    const ID: u32 = 250u32;
13228    const NAME: &'static str = "DEBUG_VECT";
13229    const EXTRA_CRC: u8 = 49u8;
13230    const ENCODED_LEN: usize = 30usize;
13231    fn deser(
13232        _version: MavlinkVersion,
13233        __input: &[u8],
13234    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13235        let avail_len = __input.len();
13236        let mut payload_buf = [0; Self::ENCODED_LEN];
13237        let mut buf = if avail_len < Self::ENCODED_LEN {
13238            payload_buf[0..avail_len].copy_from_slice(__input);
13239            Bytes::new(&payload_buf)
13240        } else {
13241            Bytes::new(__input)
13242        };
13243        let mut __struct = Self::default();
13244        __struct.time_usec = buf.get_u64_le()?;
13245        __struct.x = buf.get_f32_le()?;
13246        __struct.y = buf.get_f32_le()?;
13247        __struct.z = buf.get_f32_le()?;
13248        let mut tmp = [0_u8; 10usize];
13249        for v in &mut tmp {
13250            *v = buf.get_u8()?;
13251        }
13252        __struct.name = CharArray::new(tmp);
13253        Ok(__struct)
13254    }
13255    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13256        let mut __tmp = BytesMut::new(bytes);
13257        #[allow(clippy::absurd_extreme_comparisons)]
13258        #[allow(unused_comparisons)]
13259        if __tmp.remaining() < Self::ENCODED_LEN {
13260            panic!(
13261                "buffer is too small (need {} bytes, but got {})",
13262                Self::ENCODED_LEN,
13263                __tmp.remaining(),
13264            )
13265        }
13266        __tmp.put_u64_le(self.time_usec);
13267        __tmp.put_f32_le(self.x);
13268        __tmp.put_f32_le(self.y);
13269        __tmp.put_f32_le(self.z);
13270        for val in &self.name {
13271            __tmp.put_u8(*val);
13272        }
13273        if matches!(version, MavlinkVersion::V2) {
13274            let len = __tmp.len();
13275            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13276        } else {
13277            __tmp.len()
13278        }
13279    }
13280}
13281#[doc = "Distance sensor information for an onboard rangefinder."]
13282#[doc = ""]
13283#[doc = "ID: 132"]
13284#[derive(Debug, Clone, PartialEq)]
13285#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13286#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13287#[cfg_attr(feature = "ts", derive(TS))]
13288#[cfg_attr(feature = "ts", ts(export))]
13289pub struct DISTANCE_SENSOR_DATA {
13290    #[doc = "Timestamp (time since system boot)."]
13291    pub time_boot_ms: u32,
13292    #[doc = "Minimum distance the sensor can measure"]
13293    pub min_distance: u16,
13294    #[doc = "Maximum distance the sensor can measure"]
13295    pub max_distance: u16,
13296    #[doc = "Current distance reading"]
13297    pub current_distance: u16,
13298    #[doc = "Type of distance sensor."]
13299    pub mavtype: MavDistanceSensor,
13300    #[doc = "Onboard ID of the sensor"]
13301    pub id: u8,
13302    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
13303    pub orientation: MavSensorOrientation,
13304    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
13305    pub covariance: u8,
13306    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
13307    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13308    pub horizontal_fov: f32,
13309    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
13310    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13311    pub vertical_fov: f32,
13312    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
13313    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13314    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13315    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13316    pub quaternion: [f32; 4],
13317    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
13318    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13319    pub signal_quality: u8,
13320}
13321impl DISTANCE_SENSOR_DATA {
13322    pub const ENCODED_LEN: usize = 39usize;
13323    pub const DEFAULT: Self = Self {
13324        time_boot_ms: 0_u32,
13325        min_distance: 0_u16,
13326        max_distance: 0_u16,
13327        current_distance: 0_u16,
13328        mavtype: MavDistanceSensor::DEFAULT,
13329        id: 0_u8,
13330        orientation: MavSensorOrientation::DEFAULT,
13331        covariance: 0_u8,
13332        horizontal_fov: 0.0_f32,
13333        vertical_fov: 0.0_f32,
13334        quaternion: [0.0_f32; 4usize],
13335        signal_quality: 0_u8,
13336    };
13337    #[cfg(feature = "arbitrary")]
13338    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13339        use arbitrary::{Arbitrary, Unstructured};
13340        let mut buf = [0u8; 1024];
13341        rng.fill_bytes(&mut buf);
13342        let mut unstructured = Unstructured::new(&buf);
13343        Self::arbitrary(&mut unstructured).unwrap_or_default()
13344    }
13345}
13346impl Default for DISTANCE_SENSOR_DATA {
13347    fn default() -> Self {
13348        Self::DEFAULT.clone()
13349    }
13350}
13351impl MessageData for DISTANCE_SENSOR_DATA {
13352    type Message = MavMessage;
13353    const ID: u32 = 132u32;
13354    const NAME: &'static str = "DISTANCE_SENSOR";
13355    const EXTRA_CRC: u8 = 85u8;
13356    const ENCODED_LEN: usize = 39usize;
13357    fn deser(
13358        _version: MavlinkVersion,
13359        __input: &[u8],
13360    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13361        let avail_len = __input.len();
13362        let mut payload_buf = [0; Self::ENCODED_LEN];
13363        let mut buf = if avail_len < Self::ENCODED_LEN {
13364            payload_buf[0..avail_len].copy_from_slice(__input);
13365            Bytes::new(&payload_buf)
13366        } else {
13367            Bytes::new(__input)
13368        };
13369        let mut __struct = Self::default();
13370        __struct.time_boot_ms = buf.get_u32_le()?;
13371        __struct.min_distance = buf.get_u16_le()?;
13372        __struct.max_distance = buf.get_u16_le()?;
13373        __struct.current_distance = buf.get_u16_le()?;
13374        let tmp = buf.get_u8()?;
13375        __struct.mavtype =
13376            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13377                enum_type: "MavDistanceSensor",
13378                value: tmp as u64,
13379            })?;
13380        __struct.id = buf.get_u8()?;
13381        let tmp = buf.get_u8()?;
13382        __struct.orientation =
13383            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13384                enum_type: "MavSensorOrientation",
13385                value: tmp as u64,
13386            })?;
13387        __struct.covariance = buf.get_u8()?;
13388        __struct.horizontal_fov = buf.get_f32_le()?;
13389        __struct.vertical_fov = buf.get_f32_le()?;
13390        for v in &mut __struct.quaternion {
13391            let val = buf.get_f32_le()?;
13392            *v = val;
13393        }
13394        __struct.signal_quality = buf.get_u8()?;
13395        Ok(__struct)
13396    }
13397    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13398        let mut __tmp = BytesMut::new(bytes);
13399        #[allow(clippy::absurd_extreme_comparisons)]
13400        #[allow(unused_comparisons)]
13401        if __tmp.remaining() < Self::ENCODED_LEN {
13402            panic!(
13403                "buffer is too small (need {} bytes, but got {})",
13404                Self::ENCODED_LEN,
13405                __tmp.remaining(),
13406            )
13407        }
13408        __tmp.put_u32_le(self.time_boot_ms);
13409        __tmp.put_u16_le(self.min_distance);
13410        __tmp.put_u16_le(self.max_distance);
13411        __tmp.put_u16_le(self.current_distance);
13412        __tmp.put_u8(self.mavtype as u8);
13413        __tmp.put_u8(self.id);
13414        __tmp.put_u8(self.orientation as u8);
13415        __tmp.put_u8(self.covariance);
13416        if matches!(version, MavlinkVersion::V2) {
13417            __tmp.put_f32_le(self.horizontal_fov);
13418            __tmp.put_f32_le(self.vertical_fov);
13419            for val in &self.quaternion {
13420                __tmp.put_f32_le(*val);
13421            }
13422            __tmp.put_u8(self.signal_quality);
13423            let len = __tmp.len();
13424            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13425        } else {
13426            __tmp.len()
13427        }
13428    }
13429}
13430#[doc = "EFI status output."]
13431#[doc = ""]
13432#[doc = "ID: 225"]
13433#[derive(Debug, Clone, PartialEq)]
13434#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13435#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13436#[cfg_attr(feature = "ts", derive(TS))]
13437#[cfg_attr(feature = "ts", ts(export))]
13438pub struct EFI_STATUS_DATA {
13439    #[doc = "ECU index"]
13440    pub ecu_index: f32,
13441    #[doc = "RPM"]
13442    pub rpm: f32,
13443    #[doc = "Fuel consumed"]
13444    pub fuel_consumed: f32,
13445    #[doc = "Fuel flow rate"]
13446    pub fuel_flow: f32,
13447    #[doc = "Engine load"]
13448    pub engine_load: f32,
13449    #[doc = "Throttle position"]
13450    pub throttle_position: f32,
13451    #[doc = "Spark dwell time"]
13452    pub spark_dwell_time: f32,
13453    #[doc = "Barometric pressure"]
13454    pub barometric_pressure: f32,
13455    #[doc = "Intake manifold pressure("]
13456    pub intake_manifold_pressure: f32,
13457    #[doc = "Intake manifold temperature"]
13458    pub intake_manifold_temperature: f32,
13459    #[doc = "Cylinder head temperature"]
13460    pub cylinder_head_temperature: f32,
13461    #[doc = "Ignition timing (Crank angle degrees)"]
13462    pub ignition_timing: f32,
13463    #[doc = "Injection time"]
13464    pub injection_time: f32,
13465    #[doc = "Exhaust gas temperature"]
13466    pub exhaust_gas_temperature: f32,
13467    #[doc = "Output throttle"]
13468    pub throttle_out: f32,
13469    #[doc = "Pressure/temperature compensation"]
13470    pub pt_compensation: f32,
13471    #[doc = "EFI health status"]
13472    pub health: u8,
13473    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
13474    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13475    pub ignition_voltage: f32,
13476    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
13477    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13478    pub fuel_pressure: f32,
13479}
13480impl EFI_STATUS_DATA {
13481    pub const ENCODED_LEN: usize = 73usize;
13482    pub const DEFAULT: Self = Self {
13483        ecu_index: 0.0_f32,
13484        rpm: 0.0_f32,
13485        fuel_consumed: 0.0_f32,
13486        fuel_flow: 0.0_f32,
13487        engine_load: 0.0_f32,
13488        throttle_position: 0.0_f32,
13489        spark_dwell_time: 0.0_f32,
13490        barometric_pressure: 0.0_f32,
13491        intake_manifold_pressure: 0.0_f32,
13492        intake_manifold_temperature: 0.0_f32,
13493        cylinder_head_temperature: 0.0_f32,
13494        ignition_timing: 0.0_f32,
13495        injection_time: 0.0_f32,
13496        exhaust_gas_temperature: 0.0_f32,
13497        throttle_out: 0.0_f32,
13498        pt_compensation: 0.0_f32,
13499        health: 0_u8,
13500        ignition_voltage: 0.0_f32,
13501        fuel_pressure: 0.0_f32,
13502    };
13503    #[cfg(feature = "arbitrary")]
13504    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13505        use arbitrary::{Arbitrary, Unstructured};
13506        let mut buf = [0u8; 1024];
13507        rng.fill_bytes(&mut buf);
13508        let mut unstructured = Unstructured::new(&buf);
13509        Self::arbitrary(&mut unstructured).unwrap_or_default()
13510    }
13511}
13512impl Default for EFI_STATUS_DATA {
13513    fn default() -> Self {
13514        Self::DEFAULT.clone()
13515    }
13516}
13517impl MessageData for EFI_STATUS_DATA {
13518    type Message = MavMessage;
13519    const ID: u32 = 225u32;
13520    const NAME: &'static str = "EFI_STATUS";
13521    const EXTRA_CRC: u8 = 208u8;
13522    const ENCODED_LEN: usize = 73usize;
13523    fn deser(
13524        _version: MavlinkVersion,
13525        __input: &[u8],
13526    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13527        let avail_len = __input.len();
13528        let mut payload_buf = [0; Self::ENCODED_LEN];
13529        let mut buf = if avail_len < Self::ENCODED_LEN {
13530            payload_buf[0..avail_len].copy_from_slice(__input);
13531            Bytes::new(&payload_buf)
13532        } else {
13533            Bytes::new(__input)
13534        };
13535        let mut __struct = Self::default();
13536        __struct.ecu_index = buf.get_f32_le()?;
13537        __struct.rpm = buf.get_f32_le()?;
13538        __struct.fuel_consumed = buf.get_f32_le()?;
13539        __struct.fuel_flow = buf.get_f32_le()?;
13540        __struct.engine_load = buf.get_f32_le()?;
13541        __struct.throttle_position = buf.get_f32_le()?;
13542        __struct.spark_dwell_time = buf.get_f32_le()?;
13543        __struct.barometric_pressure = buf.get_f32_le()?;
13544        __struct.intake_manifold_pressure = buf.get_f32_le()?;
13545        __struct.intake_manifold_temperature = buf.get_f32_le()?;
13546        __struct.cylinder_head_temperature = buf.get_f32_le()?;
13547        __struct.ignition_timing = buf.get_f32_le()?;
13548        __struct.injection_time = buf.get_f32_le()?;
13549        __struct.exhaust_gas_temperature = buf.get_f32_le()?;
13550        __struct.throttle_out = buf.get_f32_le()?;
13551        __struct.pt_compensation = buf.get_f32_le()?;
13552        __struct.health = buf.get_u8()?;
13553        __struct.ignition_voltage = buf.get_f32_le()?;
13554        __struct.fuel_pressure = buf.get_f32_le()?;
13555        Ok(__struct)
13556    }
13557    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13558        let mut __tmp = BytesMut::new(bytes);
13559        #[allow(clippy::absurd_extreme_comparisons)]
13560        #[allow(unused_comparisons)]
13561        if __tmp.remaining() < Self::ENCODED_LEN {
13562            panic!(
13563                "buffer is too small (need {} bytes, but got {})",
13564                Self::ENCODED_LEN,
13565                __tmp.remaining(),
13566            )
13567        }
13568        __tmp.put_f32_le(self.ecu_index);
13569        __tmp.put_f32_le(self.rpm);
13570        __tmp.put_f32_le(self.fuel_consumed);
13571        __tmp.put_f32_le(self.fuel_flow);
13572        __tmp.put_f32_le(self.engine_load);
13573        __tmp.put_f32_le(self.throttle_position);
13574        __tmp.put_f32_le(self.spark_dwell_time);
13575        __tmp.put_f32_le(self.barometric_pressure);
13576        __tmp.put_f32_le(self.intake_manifold_pressure);
13577        __tmp.put_f32_le(self.intake_manifold_temperature);
13578        __tmp.put_f32_le(self.cylinder_head_temperature);
13579        __tmp.put_f32_le(self.ignition_timing);
13580        __tmp.put_f32_le(self.injection_time);
13581        __tmp.put_f32_le(self.exhaust_gas_temperature);
13582        __tmp.put_f32_le(self.throttle_out);
13583        __tmp.put_f32_le(self.pt_compensation);
13584        __tmp.put_u8(self.health);
13585        if matches!(version, MavlinkVersion::V2) {
13586            __tmp.put_f32_le(self.ignition_voltage);
13587            __tmp.put_f32_le(self.fuel_pressure);
13588            let len = __tmp.len();
13589            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13590        } else {
13591            __tmp.len()
13592        }
13593    }
13594}
13595#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
13596#[doc = ""]
13597#[doc = "ID: 131"]
13598#[derive(Debug, Clone, PartialEq)]
13599#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13600#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13601#[cfg_attr(feature = "ts", derive(TS))]
13602#[cfg_attr(feature = "ts", ts(export))]
13603pub struct ENCAPSULATED_DATA_DATA {
13604    #[doc = "sequence number (starting with 0 on every transmission)"]
13605    pub seqnr: u16,
13606    #[doc = "image data bytes"]
13607    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13608    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13609    pub data: [u8; 253],
13610}
13611impl ENCAPSULATED_DATA_DATA {
13612    pub const ENCODED_LEN: usize = 255usize;
13613    pub const DEFAULT: Self = Self {
13614        seqnr: 0_u16,
13615        data: [0_u8; 253usize],
13616    };
13617    #[cfg(feature = "arbitrary")]
13618    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13619        use arbitrary::{Arbitrary, Unstructured};
13620        let mut buf = [0u8; 1024];
13621        rng.fill_bytes(&mut buf);
13622        let mut unstructured = Unstructured::new(&buf);
13623        Self::arbitrary(&mut unstructured).unwrap_or_default()
13624    }
13625}
13626impl Default for ENCAPSULATED_DATA_DATA {
13627    fn default() -> Self {
13628        Self::DEFAULT.clone()
13629    }
13630}
13631impl MessageData for ENCAPSULATED_DATA_DATA {
13632    type Message = MavMessage;
13633    const ID: u32 = 131u32;
13634    const NAME: &'static str = "ENCAPSULATED_DATA";
13635    const EXTRA_CRC: u8 = 223u8;
13636    const ENCODED_LEN: usize = 255usize;
13637    fn deser(
13638        _version: MavlinkVersion,
13639        __input: &[u8],
13640    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13641        let avail_len = __input.len();
13642        let mut payload_buf = [0; Self::ENCODED_LEN];
13643        let mut buf = if avail_len < Self::ENCODED_LEN {
13644            payload_buf[0..avail_len].copy_from_slice(__input);
13645            Bytes::new(&payload_buf)
13646        } else {
13647            Bytes::new(__input)
13648        };
13649        let mut __struct = Self::default();
13650        __struct.seqnr = buf.get_u16_le()?;
13651        for v in &mut __struct.data {
13652            let val = buf.get_u8()?;
13653            *v = val;
13654        }
13655        Ok(__struct)
13656    }
13657    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13658        let mut __tmp = BytesMut::new(bytes);
13659        #[allow(clippy::absurd_extreme_comparisons)]
13660        #[allow(unused_comparisons)]
13661        if __tmp.remaining() < Self::ENCODED_LEN {
13662            panic!(
13663                "buffer is too small (need {} bytes, but got {})",
13664                Self::ENCODED_LEN,
13665                __tmp.remaining(),
13666            )
13667        }
13668        __tmp.put_u16_le(self.seqnr);
13669        for val in &self.data {
13670            __tmp.put_u8(*val);
13671        }
13672        if matches!(version, MavlinkVersion::V2) {
13673            let len = __tmp.len();
13674            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13675        } else {
13676            __tmp.len()
13677        }
13678    }
13679}
13680#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
13681#[doc = ""]
13682#[doc = "ID: 290"]
13683#[derive(Debug, Clone, PartialEq)]
13684#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13685#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13686#[cfg_attr(feature = "ts", derive(TS))]
13687#[cfg_attr(feature = "ts", ts(export))]
13688pub struct ESC_INFO_DATA {
13689    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
13690    pub time_usec: u64,
13691    #[doc = "Number of reported errors by each ESC since boot."]
13692    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13693    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13694    pub error_count: [u32; 4],
13695    #[doc = "Counter of data packets received."]
13696    pub counter: u16,
13697    #[doc = "Bitmap of ESC failure flags."]
13698    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13699    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13700    pub failure_flags: [u16; 4],
13701    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
13702    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13703    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13704    pub temperature: [i16; 4],
13705    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
13706    pub index: u8,
13707    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
13708    pub count: u8,
13709    #[doc = "Connection type protocol for all ESC."]
13710    pub connection_type: EscConnectionType,
13711    #[doc = "Information regarding online/offline status of each ESC."]
13712    pub info: u8,
13713}
13714impl ESC_INFO_DATA {
13715    pub const ENCODED_LEN: usize = 46usize;
13716    pub const DEFAULT: Self = Self {
13717        time_usec: 0_u64,
13718        error_count: [0_u32; 4usize],
13719        counter: 0_u16,
13720        failure_flags: [0_u16; 4usize],
13721        temperature: [0_i16; 4usize],
13722        index: 0_u8,
13723        count: 0_u8,
13724        connection_type: EscConnectionType::DEFAULT,
13725        info: 0_u8,
13726    };
13727    #[cfg(feature = "arbitrary")]
13728    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13729        use arbitrary::{Arbitrary, Unstructured};
13730        let mut buf = [0u8; 1024];
13731        rng.fill_bytes(&mut buf);
13732        let mut unstructured = Unstructured::new(&buf);
13733        Self::arbitrary(&mut unstructured).unwrap_or_default()
13734    }
13735}
13736impl Default for ESC_INFO_DATA {
13737    fn default() -> Self {
13738        Self::DEFAULT.clone()
13739    }
13740}
13741impl MessageData for ESC_INFO_DATA {
13742    type Message = MavMessage;
13743    const ID: u32 = 290u32;
13744    const NAME: &'static str = "ESC_INFO";
13745    const EXTRA_CRC: u8 = 251u8;
13746    const ENCODED_LEN: usize = 46usize;
13747    fn deser(
13748        _version: MavlinkVersion,
13749        __input: &[u8],
13750    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13751        let avail_len = __input.len();
13752        let mut payload_buf = [0; Self::ENCODED_LEN];
13753        let mut buf = if avail_len < Self::ENCODED_LEN {
13754            payload_buf[0..avail_len].copy_from_slice(__input);
13755            Bytes::new(&payload_buf)
13756        } else {
13757            Bytes::new(__input)
13758        };
13759        let mut __struct = Self::default();
13760        __struct.time_usec = buf.get_u64_le()?;
13761        for v in &mut __struct.error_count {
13762            let val = buf.get_u32_le()?;
13763            *v = val;
13764        }
13765        __struct.counter = buf.get_u16_le()?;
13766        for v in &mut __struct.failure_flags {
13767            let val = buf.get_u16_le()?;
13768            *v = val;
13769        }
13770        for v in &mut __struct.temperature {
13771            let val = buf.get_i16_le()?;
13772            *v = val;
13773        }
13774        __struct.index = buf.get_u8()?;
13775        __struct.count = buf.get_u8()?;
13776        let tmp = buf.get_u8()?;
13777        __struct.connection_type =
13778            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13779                enum_type: "EscConnectionType",
13780                value: tmp as u64,
13781            })?;
13782        __struct.info = buf.get_u8()?;
13783        Ok(__struct)
13784    }
13785    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13786        let mut __tmp = BytesMut::new(bytes);
13787        #[allow(clippy::absurd_extreme_comparisons)]
13788        #[allow(unused_comparisons)]
13789        if __tmp.remaining() < Self::ENCODED_LEN {
13790            panic!(
13791                "buffer is too small (need {} bytes, but got {})",
13792                Self::ENCODED_LEN,
13793                __tmp.remaining(),
13794            )
13795        }
13796        __tmp.put_u64_le(self.time_usec);
13797        for val in &self.error_count {
13798            __tmp.put_u32_le(*val);
13799        }
13800        __tmp.put_u16_le(self.counter);
13801        for val in &self.failure_flags {
13802            __tmp.put_u16_le(*val);
13803        }
13804        for val in &self.temperature {
13805            __tmp.put_i16_le(*val);
13806        }
13807        __tmp.put_u8(self.index);
13808        __tmp.put_u8(self.count);
13809        __tmp.put_u8(self.connection_type as u8);
13810        __tmp.put_u8(self.info);
13811        if matches!(version, MavlinkVersion::V2) {
13812            let len = __tmp.len();
13813            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13814        } else {
13815            __tmp.len()
13816        }
13817    }
13818}
13819#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
13820#[doc = ""]
13821#[doc = "ID: 291"]
13822#[derive(Debug, Clone, PartialEq)]
13823#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13824#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13825#[cfg_attr(feature = "ts", derive(TS))]
13826#[cfg_attr(feature = "ts", ts(export))]
13827pub struct ESC_STATUS_DATA {
13828    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
13829    pub time_usec: u64,
13830    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
13831    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13832    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13833    pub rpm: [i32; 4],
13834    #[doc = "Voltage measured from each ESC."]
13835    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13836    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13837    pub voltage: [f32; 4],
13838    #[doc = "Current measured from each ESC."]
13839    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13840    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13841    pub current: [f32; 4],
13842    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
13843    pub index: u8,
13844}
13845impl ESC_STATUS_DATA {
13846    pub const ENCODED_LEN: usize = 57usize;
13847    pub const DEFAULT: Self = Self {
13848        time_usec: 0_u64,
13849        rpm: [0_i32; 4usize],
13850        voltage: [0.0_f32; 4usize],
13851        current: [0.0_f32; 4usize],
13852        index: 0_u8,
13853    };
13854    #[cfg(feature = "arbitrary")]
13855    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13856        use arbitrary::{Arbitrary, Unstructured};
13857        let mut buf = [0u8; 1024];
13858        rng.fill_bytes(&mut buf);
13859        let mut unstructured = Unstructured::new(&buf);
13860        Self::arbitrary(&mut unstructured).unwrap_or_default()
13861    }
13862}
13863impl Default for ESC_STATUS_DATA {
13864    fn default() -> Self {
13865        Self::DEFAULT.clone()
13866    }
13867}
13868impl MessageData for ESC_STATUS_DATA {
13869    type Message = MavMessage;
13870    const ID: u32 = 291u32;
13871    const NAME: &'static str = "ESC_STATUS";
13872    const EXTRA_CRC: u8 = 10u8;
13873    const ENCODED_LEN: usize = 57usize;
13874    fn deser(
13875        _version: MavlinkVersion,
13876        __input: &[u8],
13877    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13878        let avail_len = __input.len();
13879        let mut payload_buf = [0; Self::ENCODED_LEN];
13880        let mut buf = if avail_len < Self::ENCODED_LEN {
13881            payload_buf[0..avail_len].copy_from_slice(__input);
13882            Bytes::new(&payload_buf)
13883        } else {
13884            Bytes::new(__input)
13885        };
13886        let mut __struct = Self::default();
13887        __struct.time_usec = buf.get_u64_le()?;
13888        for v in &mut __struct.rpm {
13889            let val = buf.get_i32_le()?;
13890            *v = val;
13891        }
13892        for v in &mut __struct.voltage {
13893            let val = buf.get_f32_le()?;
13894            *v = val;
13895        }
13896        for v in &mut __struct.current {
13897            let val = buf.get_f32_le()?;
13898            *v = val;
13899        }
13900        __struct.index = buf.get_u8()?;
13901        Ok(__struct)
13902    }
13903    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13904        let mut __tmp = BytesMut::new(bytes);
13905        #[allow(clippy::absurd_extreme_comparisons)]
13906        #[allow(unused_comparisons)]
13907        if __tmp.remaining() < Self::ENCODED_LEN {
13908            panic!(
13909                "buffer is too small (need {} bytes, but got {})",
13910                Self::ENCODED_LEN,
13911                __tmp.remaining(),
13912            )
13913        }
13914        __tmp.put_u64_le(self.time_usec);
13915        for val in &self.rpm {
13916            __tmp.put_i32_le(*val);
13917        }
13918        for val in &self.voltage {
13919            __tmp.put_f32_le(*val);
13920        }
13921        for val in &self.current {
13922            __tmp.put_f32_le(*val);
13923        }
13924        __tmp.put_u8(self.index);
13925        if matches!(version, MavlinkVersion::V2) {
13926            let len = __tmp.len();
13927            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13928        } else {
13929            __tmp.len()
13930        }
13931    }
13932}
13933#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
13934#[doc = ""]
13935#[doc = "ID: 230"]
13936#[derive(Debug, Clone, PartialEq)]
13937#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13938#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13939#[cfg_attr(feature = "ts", derive(TS))]
13940#[cfg_attr(feature = "ts", ts(export))]
13941pub struct ESTIMATOR_STATUS_DATA {
13942    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13943    pub time_usec: u64,
13944    #[doc = "Velocity innovation test ratio"]
13945    pub vel_ratio: f32,
13946    #[doc = "Horizontal position innovation test ratio"]
13947    pub pos_horiz_ratio: f32,
13948    #[doc = "Vertical position innovation test ratio"]
13949    pub pos_vert_ratio: f32,
13950    #[doc = "Magnetometer innovation test ratio"]
13951    pub mag_ratio: f32,
13952    #[doc = "Height above terrain innovation test ratio"]
13953    pub hagl_ratio: f32,
13954    #[doc = "True airspeed innovation test ratio"]
13955    pub tas_ratio: f32,
13956    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
13957    pub pos_horiz_accuracy: f32,
13958    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
13959    pub pos_vert_accuracy: f32,
13960    #[doc = "Bitmap indicating which EKF outputs are valid."]
13961    pub flags: EstimatorStatusFlags,
13962}
13963impl ESTIMATOR_STATUS_DATA {
13964    pub const ENCODED_LEN: usize = 42usize;
13965    pub const DEFAULT: Self = Self {
13966        time_usec: 0_u64,
13967        vel_ratio: 0.0_f32,
13968        pos_horiz_ratio: 0.0_f32,
13969        pos_vert_ratio: 0.0_f32,
13970        mag_ratio: 0.0_f32,
13971        hagl_ratio: 0.0_f32,
13972        tas_ratio: 0.0_f32,
13973        pos_horiz_accuracy: 0.0_f32,
13974        pos_vert_accuracy: 0.0_f32,
13975        flags: EstimatorStatusFlags::DEFAULT,
13976    };
13977    #[cfg(feature = "arbitrary")]
13978    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13979        use arbitrary::{Arbitrary, Unstructured};
13980        let mut buf = [0u8; 1024];
13981        rng.fill_bytes(&mut buf);
13982        let mut unstructured = Unstructured::new(&buf);
13983        Self::arbitrary(&mut unstructured).unwrap_or_default()
13984    }
13985}
13986impl Default for ESTIMATOR_STATUS_DATA {
13987    fn default() -> Self {
13988        Self::DEFAULT.clone()
13989    }
13990}
13991impl MessageData for ESTIMATOR_STATUS_DATA {
13992    type Message = MavMessage;
13993    const ID: u32 = 230u32;
13994    const NAME: &'static str = "ESTIMATOR_STATUS";
13995    const EXTRA_CRC: u8 = 163u8;
13996    const ENCODED_LEN: usize = 42usize;
13997    fn deser(
13998        _version: MavlinkVersion,
13999        __input: &[u8],
14000    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14001        let avail_len = __input.len();
14002        let mut payload_buf = [0; Self::ENCODED_LEN];
14003        let mut buf = if avail_len < Self::ENCODED_LEN {
14004            payload_buf[0..avail_len].copy_from_slice(__input);
14005            Bytes::new(&payload_buf)
14006        } else {
14007            Bytes::new(__input)
14008        };
14009        let mut __struct = Self::default();
14010        __struct.time_usec = buf.get_u64_le()?;
14011        __struct.vel_ratio = buf.get_f32_le()?;
14012        __struct.pos_horiz_ratio = buf.get_f32_le()?;
14013        __struct.pos_vert_ratio = buf.get_f32_le()?;
14014        __struct.mag_ratio = buf.get_f32_le()?;
14015        __struct.hagl_ratio = buf.get_f32_le()?;
14016        __struct.tas_ratio = buf.get_f32_le()?;
14017        __struct.pos_horiz_accuracy = buf.get_f32_le()?;
14018        __struct.pos_vert_accuracy = buf.get_f32_le()?;
14019        let tmp = buf.get_u16_le()?;
14020        __struct.flags = EstimatorStatusFlags::from_bits(
14021            tmp as <EstimatorStatusFlags as Flags>::Bits,
14022        )
14023        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14024            flag_type: "EstimatorStatusFlags",
14025            value: tmp as u64,
14026        })?;
14027        Ok(__struct)
14028    }
14029    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14030        let mut __tmp = BytesMut::new(bytes);
14031        #[allow(clippy::absurd_extreme_comparisons)]
14032        #[allow(unused_comparisons)]
14033        if __tmp.remaining() < Self::ENCODED_LEN {
14034            panic!(
14035                "buffer is too small (need {} bytes, but got {})",
14036                Self::ENCODED_LEN,
14037                __tmp.remaining(),
14038            )
14039        }
14040        __tmp.put_u64_le(self.time_usec);
14041        __tmp.put_f32_le(self.vel_ratio);
14042        __tmp.put_f32_le(self.pos_horiz_ratio);
14043        __tmp.put_f32_le(self.pos_vert_ratio);
14044        __tmp.put_f32_le(self.mag_ratio);
14045        __tmp.put_f32_le(self.hagl_ratio);
14046        __tmp.put_f32_le(self.tas_ratio);
14047        __tmp.put_f32_le(self.pos_horiz_accuracy);
14048        __tmp.put_f32_le(self.pos_vert_accuracy);
14049        __tmp.put_u16_le(self.flags.bits() as u16);
14050        if matches!(version, MavlinkVersion::V2) {
14051            let len = __tmp.len();
14052            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14053        } else {
14054            __tmp.len()
14055        }
14056    }
14057}
14058#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
14059#[doc = ""]
14060#[doc = "ID: 410"]
14061#[derive(Debug, Clone, PartialEq)]
14062#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14063#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14064#[cfg_attr(feature = "ts", derive(TS))]
14065#[cfg_attr(feature = "ts", ts(export))]
14066pub struct EVENT_DATA {
14067    #[doc = "Event ID (as defined in the component metadata)"]
14068    pub id: u32,
14069    #[doc = "Timestamp (time since system boot when the event happened)."]
14070    pub event_time_boot_ms: u32,
14071    #[doc = "Sequence number."]
14072    pub sequence: u16,
14073    #[doc = "Component ID"]
14074    pub destination_component: u8,
14075    #[doc = "System ID"]
14076    pub destination_system: u8,
14077    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
14078    pub log_levels: u8,
14079    #[doc = "Arguments (depend on event ID)."]
14080    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14081    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14082    pub arguments: [u8; 40],
14083}
14084impl EVENT_DATA {
14085    pub const ENCODED_LEN: usize = 53usize;
14086    pub const DEFAULT: Self = Self {
14087        id: 0_u32,
14088        event_time_boot_ms: 0_u32,
14089        sequence: 0_u16,
14090        destination_component: 0_u8,
14091        destination_system: 0_u8,
14092        log_levels: 0_u8,
14093        arguments: [0_u8; 40usize],
14094    };
14095    #[cfg(feature = "arbitrary")]
14096    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14097        use arbitrary::{Arbitrary, Unstructured};
14098        let mut buf = [0u8; 1024];
14099        rng.fill_bytes(&mut buf);
14100        let mut unstructured = Unstructured::new(&buf);
14101        Self::arbitrary(&mut unstructured).unwrap_or_default()
14102    }
14103}
14104impl Default for EVENT_DATA {
14105    fn default() -> Self {
14106        Self::DEFAULT.clone()
14107    }
14108}
14109impl MessageData for EVENT_DATA {
14110    type Message = MavMessage;
14111    const ID: u32 = 410u32;
14112    const NAME: &'static str = "EVENT";
14113    const EXTRA_CRC: u8 = 160u8;
14114    const ENCODED_LEN: usize = 53usize;
14115    fn deser(
14116        _version: MavlinkVersion,
14117        __input: &[u8],
14118    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14119        let avail_len = __input.len();
14120        let mut payload_buf = [0; Self::ENCODED_LEN];
14121        let mut buf = if avail_len < Self::ENCODED_LEN {
14122            payload_buf[0..avail_len].copy_from_slice(__input);
14123            Bytes::new(&payload_buf)
14124        } else {
14125            Bytes::new(__input)
14126        };
14127        let mut __struct = Self::default();
14128        __struct.id = buf.get_u32_le()?;
14129        __struct.event_time_boot_ms = buf.get_u32_le()?;
14130        __struct.sequence = buf.get_u16_le()?;
14131        __struct.destination_component = buf.get_u8()?;
14132        __struct.destination_system = buf.get_u8()?;
14133        __struct.log_levels = buf.get_u8()?;
14134        for v in &mut __struct.arguments {
14135            let val = buf.get_u8()?;
14136            *v = val;
14137        }
14138        Ok(__struct)
14139    }
14140    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14141        let mut __tmp = BytesMut::new(bytes);
14142        #[allow(clippy::absurd_extreme_comparisons)]
14143        #[allow(unused_comparisons)]
14144        if __tmp.remaining() < Self::ENCODED_LEN {
14145            panic!(
14146                "buffer is too small (need {} bytes, but got {})",
14147                Self::ENCODED_LEN,
14148                __tmp.remaining(),
14149            )
14150        }
14151        __tmp.put_u32_le(self.id);
14152        __tmp.put_u32_le(self.event_time_boot_ms);
14153        __tmp.put_u16_le(self.sequence);
14154        __tmp.put_u8(self.destination_component);
14155        __tmp.put_u8(self.destination_system);
14156        __tmp.put_u8(self.log_levels);
14157        for val in &self.arguments {
14158            __tmp.put_u8(*val);
14159        }
14160        if matches!(version, MavlinkVersion::V2) {
14161            let len = __tmp.len();
14162            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14163        } else {
14164            __tmp.len()
14165        }
14166    }
14167}
14168#[doc = "Provides state for additional features."]
14169#[doc = ""]
14170#[doc = "ID: 245"]
14171#[derive(Debug, Clone, PartialEq)]
14172#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14173#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14174#[cfg_attr(feature = "ts", derive(TS))]
14175#[cfg_attr(feature = "ts", ts(export))]
14176pub struct EXTENDED_SYS_STATE_DATA {
14177    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
14178    pub vtol_state: MavVtolState,
14179    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
14180    pub landed_state: MavLandedState,
14181}
14182impl EXTENDED_SYS_STATE_DATA {
14183    pub const ENCODED_LEN: usize = 2usize;
14184    pub const DEFAULT: Self = Self {
14185        vtol_state: MavVtolState::DEFAULT,
14186        landed_state: MavLandedState::DEFAULT,
14187    };
14188    #[cfg(feature = "arbitrary")]
14189    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14190        use arbitrary::{Arbitrary, Unstructured};
14191        let mut buf = [0u8; 1024];
14192        rng.fill_bytes(&mut buf);
14193        let mut unstructured = Unstructured::new(&buf);
14194        Self::arbitrary(&mut unstructured).unwrap_or_default()
14195    }
14196}
14197impl Default for EXTENDED_SYS_STATE_DATA {
14198    fn default() -> Self {
14199        Self::DEFAULT.clone()
14200    }
14201}
14202impl MessageData for EXTENDED_SYS_STATE_DATA {
14203    type Message = MavMessage;
14204    const ID: u32 = 245u32;
14205    const NAME: &'static str = "EXTENDED_SYS_STATE";
14206    const EXTRA_CRC: u8 = 130u8;
14207    const ENCODED_LEN: usize = 2usize;
14208    fn deser(
14209        _version: MavlinkVersion,
14210        __input: &[u8],
14211    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14212        let avail_len = __input.len();
14213        let mut payload_buf = [0; Self::ENCODED_LEN];
14214        let mut buf = if avail_len < Self::ENCODED_LEN {
14215            payload_buf[0..avail_len].copy_from_slice(__input);
14216            Bytes::new(&payload_buf)
14217        } else {
14218            Bytes::new(__input)
14219        };
14220        let mut __struct = Self::default();
14221        let tmp = buf.get_u8()?;
14222        __struct.vtol_state =
14223            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14224                enum_type: "MavVtolState",
14225                value: tmp as u64,
14226            })?;
14227        let tmp = buf.get_u8()?;
14228        __struct.landed_state =
14229            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14230                enum_type: "MavLandedState",
14231                value: tmp as u64,
14232            })?;
14233        Ok(__struct)
14234    }
14235    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14236        let mut __tmp = BytesMut::new(bytes);
14237        #[allow(clippy::absurd_extreme_comparisons)]
14238        #[allow(unused_comparisons)]
14239        if __tmp.remaining() < Self::ENCODED_LEN {
14240            panic!(
14241                "buffer is too small (need {} bytes, but got {})",
14242                Self::ENCODED_LEN,
14243                __tmp.remaining(),
14244            )
14245        }
14246        __tmp.put_u8(self.vtol_state as u8);
14247        __tmp.put_u8(self.landed_state as u8);
14248        if matches!(version, MavlinkVersion::V2) {
14249            let len = __tmp.len();
14250            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14251        } else {
14252            __tmp.len()
14253        }
14254    }
14255}
14256#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
14257#[doc = ""]
14258#[doc = "ID: 162"]
14259#[derive(Debug, Clone, PartialEq)]
14260#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14261#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14262#[cfg_attr(feature = "ts", derive(TS))]
14263#[cfg_attr(feature = "ts", ts(export))]
14264pub struct FENCE_STATUS_DATA {
14265    #[doc = "Time (since boot) of last breach."]
14266    pub breach_time: u32,
14267    #[doc = "Number of fence breaches."]
14268    pub breach_count: u16,
14269    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
14270    pub breach_status: u8,
14271    #[doc = "Last breach type."]
14272    pub breach_type: FenceBreach,
14273    #[doc = "Active action to prevent fence breach"]
14274    #[cfg_attr(feature = "serde", serde(default))]
14275    pub breach_mitigation: FenceMitigate,
14276}
14277impl FENCE_STATUS_DATA {
14278    pub const ENCODED_LEN: usize = 9usize;
14279    pub const DEFAULT: Self = Self {
14280        breach_time: 0_u32,
14281        breach_count: 0_u16,
14282        breach_status: 0_u8,
14283        breach_type: FenceBreach::DEFAULT,
14284        breach_mitigation: FenceMitigate::DEFAULT,
14285    };
14286    #[cfg(feature = "arbitrary")]
14287    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14288        use arbitrary::{Arbitrary, Unstructured};
14289        let mut buf = [0u8; 1024];
14290        rng.fill_bytes(&mut buf);
14291        let mut unstructured = Unstructured::new(&buf);
14292        Self::arbitrary(&mut unstructured).unwrap_or_default()
14293    }
14294}
14295impl Default for FENCE_STATUS_DATA {
14296    fn default() -> Self {
14297        Self::DEFAULT.clone()
14298    }
14299}
14300impl MessageData for FENCE_STATUS_DATA {
14301    type Message = MavMessage;
14302    const ID: u32 = 162u32;
14303    const NAME: &'static str = "FENCE_STATUS";
14304    const EXTRA_CRC: u8 = 189u8;
14305    const ENCODED_LEN: usize = 9usize;
14306    fn deser(
14307        _version: MavlinkVersion,
14308        __input: &[u8],
14309    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14310        let avail_len = __input.len();
14311        let mut payload_buf = [0; Self::ENCODED_LEN];
14312        let mut buf = if avail_len < Self::ENCODED_LEN {
14313            payload_buf[0..avail_len].copy_from_slice(__input);
14314            Bytes::new(&payload_buf)
14315        } else {
14316            Bytes::new(__input)
14317        };
14318        let mut __struct = Self::default();
14319        __struct.breach_time = buf.get_u32_le()?;
14320        __struct.breach_count = buf.get_u16_le()?;
14321        __struct.breach_status = buf.get_u8()?;
14322        let tmp = buf.get_u8()?;
14323        __struct.breach_type =
14324            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14325                enum_type: "FenceBreach",
14326                value: tmp as u64,
14327            })?;
14328        let tmp = buf.get_u8()?;
14329        __struct.breach_mitigation =
14330            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14331                enum_type: "FenceMitigate",
14332                value: tmp as u64,
14333            })?;
14334        Ok(__struct)
14335    }
14336    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14337        let mut __tmp = BytesMut::new(bytes);
14338        #[allow(clippy::absurd_extreme_comparisons)]
14339        #[allow(unused_comparisons)]
14340        if __tmp.remaining() < Self::ENCODED_LEN {
14341            panic!(
14342                "buffer is too small (need {} bytes, but got {})",
14343                Self::ENCODED_LEN,
14344                __tmp.remaining(),
14345            )
14346        }
14347        __tmp.put_u32_le(self.breach_time);
14348        __tmp.put_u16_le(self.breach_count);
14349        __tmp.put_u8(self.breach_status);
14350        __tmp.put_u8(self.breach_type as u8);
14351        if matches!(version, MavlinkVersion::V2) {
14352            __tmp.put_u8(self.breach_mitigation as u8);
14353            let len = __tmp.len();
14354            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14355        } else {
14356            __tmp.len()
14357        }
14358    }
14359}
14360#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
14361#[doc = ""]
14362#[doc = "ID: 110"]
14363#[derive(Debug, Clone, PartialEq)]
14364#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14366#[cfg_attr(feature = "ts", derive(TS))]
14367#[cfg_attr(feature = "ts", ts(export))]
14368pub struct FILE_TRANSFER_PROTOCOL_DATA {
14369    #[doc = "Network ID (0 for broadcast)"]
14370    pub target_network: u8,
14371    #[doc = "System ID (0 for broadcast)"]
14372    pub target_system: u8,
14373    #[doc = "Component ID (0 for broadcast)"]
14374    pub target_component: u8,
14375    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
14376    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14377    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14378    pub payload: [u8; 251],
14379}
14380impl FILE_TRANSFER_PROTOCOL_DATA {
14381    pub const ENCODED_LEN: usize = 254usize;
14382    pub const DEFAULT: Self = Self {
14383        target_network: 0_u8,
14384        target_system: 0_u8,
14385        target_component: 0_u8,
14386        payload: [0_u8; 251usize],
14387    };
14388    #[cfg(feature = "arbitrary")]
14389    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14390        use arbitrary::{Arbitrary, Unstructured};
14391        let mut buf = [0u8; 1024];
14392        rng.fill_bytes(&mut buf);
14393        let mut unstructured = Unstructured::new(&buf);
14394        Self::arbitrary(&mut unstructured).unwrap_or_default()
14395    }
14396}
14397impl Default for FILE_TRANSFER_PROTOCOL_DATA {
14398    fn default() -> Self {
14399        Self::DEFAULT.clone()
14400    }
14401}
14402impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
14403    type Message = MavMessage;
14404    const ID: u32 = 110u32;
14405    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
14406    const EXTRA_CRC: u8 = 84u8;
14407    const ENCODED_LEN: usize = 254usize;
14408    fn deser(
14409        _version: MavlinkVersion,
14410        __input: &[u8],
14411    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14412        let avail_len = __input.len();
14413        let mut payload_buf = [0; Self::ENCODED_LEN];
14414        let mut buf = if avail_len < Self::ENCODED_LEN {
14415            payload_buf[0..avail_len].copy_from_slice(__input);
14416            Bytes::new(&payload_buf)
14417        } else {
14418            Bytes::new(__input)
14419        };
14420        let mut __struct = Self::default();
14421        __struct.target_network = buf.get_u8()?;
14422        __struct.target_system = buf.get_u8()?;
14423        __struct.target_component = buf.get_u8()?;
14424        for v in &mut __struct.payload {
14425            let val = buf.get_u8()?;
14426            *v = val;
14427        }
14428        Ok(__struct)
14429    }
14430    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14431        let mut __tmp = BytesMut::new(bytes);
14432        #[allow(clippy::absurd_extreme_comparisons)]
14433        #[allow(unused_comparisons)]
14434        if __tmp.remaining() < Self::ENCODED_LEN {
14435            panic!(
14436                "buffer is too small (need {} bytes, but got {})",
14437                Self::ENCODED_LEN,
14438                __tmp.remaining(),
14439            )
14440        }
14441        __tmp.put_u8(self.target_network);
14442        __tmp.put_u8(self.target_system);
14443        __tmp.put_u8(self.target_component);
14444        for val in &self.payload {
14445            __tmp.put_u8(*val);
14446        }
14447        if matches!(version, MavlinkVersion::V2) {
14448            let len = __tmp.len();
14449            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14450        } else {
14451            __tmp.len()
14452        }
14453    }
14454}
14455#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
14456#[doc = ""]
14457#[doc = "ID: 264"]
14458#[derive(Debug, Clone, PartialEq)]
14459#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14460#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14461#[cfg_attr(feature = "ts", derive(TS))]
14462#[cfg_attr(feature = "ts", ts(export))]
14463pub struct FLIGHT_INFORMATION_DATA {
14464    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
14465    pub arming_time_utc: u64,
14466    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
14467    pub takeoff_time_utc: u64,
14468    #[doc = "Flight number. Note, field is misnamed UUID."]
14469    pub flight_uuid: u64,
14470    #[doc = "Timestamp (time since system boot)."]
14471    pub time_boot_ms: u32,
14472    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
14473    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14474    pub landing_time: u32,
14475}
14476impl FLIGHT_INFORMATION_DATA {
14477    pub const ENCODED_LEN: usize = 32usize;
14478    pub const DEFAULT: Self = Self {
14479        arming_time_utc: 0_u64,
14480        takeoff_time_utc: 0_u64,
14481        flight_uuid: 0_u64,
14482        time_boot_ms: 0_u32,
14483        landing_time: 0_u32,
14484    };
14485    #[cfg(feature = "arbitrary")]
14486    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14487        use arbitrary::{Arbitrary, Unstructured};
14488        let mut buf = [0u8; 1024];
14489        rng.fill_bytes(&mut buf);
14490        let mut unstructured = Unstructured::new(&buf);
14491        Self::arbitrary(&mut unstructured).unwrap_or_default()
14492    }
14493}
14494impl Default for FLIGHT_INFORMATION_DATA {
14495    fn default() -> Self {
14496        Self::DEFAULT.clone()
14497    }
14498}
14499impl MessageData for FLIGHT_INFORMATION_DATA {
14500    type Message = MavMessage;
14501    const ID: u32 = 264u32;
14502    const NAME: &'static str = "FLIGHT_INFORMATION";
14503    const EXTRA_CRC: u8 = 49u8;
14504    const ENCODED_LEN: usize = 32usize;
14505    fn deser(
14506        _version: MavlinkVersion,
14507        __input: &[u8],
14508    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14509        let avail_len = __input.len();
14510        let mut payload_buf = [0; Self::ENCODED_LEN];
14511        let mut buf = if avail_len < Self::ENCODED_LEN {
14512            payload_buf[0..avail_len].copy_from_slice(__input);
14513            Bytes::new(&payload_buf)
14514        } else {
14515            Bytes::new(__input)
14516        };
14517        let mut __struct = Self::default();
14518        __struct.arming_time_utc = buf.get_u64_le()?;
14519        __struct.takeoff_time_utc = buf.get_u64_le()?;
14520        __struct.flight_uuid = buf.get_u64_le()?;
14521        __struct.time_boot_ms = buf.get_u32_le()?;
14522        __struct.landing_time = buf.get_u32_le()?;
14523        Ok(__struct)
14524    }
14525    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14526        let mut __tmp = BytesMut::new(bytes);
14527        #[allow(clippy::absurd_extreme_comparisons)]
14528        #[allow(unused_comparisons)]
14529        if __tmp.remaining() < Self::ENCODED_LEN {
14530            panic!(
14531                "buffer is too small (need {} bytes, but got {})",
14532                Self::ENCODED_LEN,
14533                __tmp.remaining(),
14534            )
14535        }
14536        __tmp.put_u64_le(self.arming_time_utc);
14537        __tmp.put_u64_le(self.takeoff_time_utc);
14538        __tmp.put_u64_le(self.flight_uuid);
14539        __tmp.put_u32_le(self.time_boot_ms);
14540        if matches!(version, MavlinkVersion::V2) {
14541            __tmp.put_u32_le(self.landing_time);
14542            let len = __tmp.len();
14543            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14544        } else {
14545            __tmp.len()
14546        }
14547    }
14548}
14549#[doc = "Current motion information from a designated system."]
14550#[doc = ""]
14551#[doc = "ID: 144"]
14552#[derive(Debug, Clone, PartialEq)]
14553#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14554#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14555#[cfg_attr(feature = "ts", derive(TS))]
14556#[cfg_attr(feature = "ts", ts(export))]
14557pub struct FOLLOW_TARGET_DATA {
14558    #[doc = "Timestamp (time since system boot)."]
14559    pub timestamp: u64,
14560    #[doc = "button states or switches of a tracker device"]
14561    pub custom_state: u64,
14562    #[doc = "Latitude (WGS84)"]
14563    pub lat: i32,
14564    #[doc = "Longitude (WGS84)"]
14565    pub lon: i32,
14566    #[doc = "Altitude (MSL)"]
14567    pub alt: f32,
14568    #[doc = "target velocity (0,0,0) for unknown"]
14569    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14570    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14571    pub vel: [f32; 3],
14572    #[doc = "linear target acceleration (0,0,0) for unknown"]
14573    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14574    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14575    pub acc: [f32; 3],
14576    #[doc = "(0 0 0 0 for unknown)"]
14577    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14578    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14579    pub attitude_q: [f32; 4],
14580    #[doc = "(0 0 0 for unknown)"]
14581    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14582    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14583    pub rates: [f32; 3],
14584    #[doc = "eph epv"]
14585    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14586    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14587    pub position_cov: [f32; 3],
14588    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
14589    pub est_capabilities: u8,
14590}
14591impl FOLLOW_TARGET_DATA {
14592    pub const ENCODED_LEN: usize = 93usize;
14593    pub const DEFAULT: Self = Self {
14594        timestamp: 0_u64,
14595        custom_state: 0_u64,
14596        lat: 0_i32,
14597        lon: 0_i32,
14598        alt: 0.0_f32,
14599        vel: [0.0_f32; 3usize],
14600        acc: [0.0_f32; 3usize],
14601        attitude_q: [0.0_f32; 4usize],
14602        rates: [0.0_f32; 3usize],
14603        position_cov: [0.0_f32; 3usize],
14604        est_capabilities: 0_u8,
14605    };
14606    #[cfg(feature = "arbitrary")]
14607    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14608        use arbitrary::{Arbitrary, Unstructured};
14609        let mut buf = [0u8; 1024];
14610        rng.fill_bytes(&mut buf);
14611        let mut unstructured = Unstructured::new(&buf);
14612        Self::arbitrary(&mut unstructured).unwrap_or_default()
14613    }
14614}
14615impl Default for FOLLOW_TARGET_DATA {
14616    fn default() -> Self {
14617        Self::DEFAULT.clone()
14618    }
14619}
14620impl MessageData for FOLLOW_TARGET_DATA {
14621    type Message = MavMessage;
14622    const ID: u32 = 144u32;
14623    const NAME: &'static str = "FOLLOW_TARGET";
14624    const EXTRA_CRC: u8 = 127u8;
14625    const ENCODED_LEN: usize = 93usize;
14626    fn deser(
14627        _version: MavlinkVersion,
14628        __input: &[u8],
14629    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14630        let avail_len = __input.len();
14631        let mut payload_buf = [0; Self::ENCODED_LEN];
14632        let mut buf = if avail_len < Self::ENCODED_LEN {
14633            payload_buf[0..avail_len].copy_from_slice(__input);
14634            Bytes::new(&payload_buf)
14635        } else {
14636            Bytes::new(__input)
14637        };
14638        let mut __struct = Self::default();
14639        __struct.timestamp = buf.get_u64_le()?;
14640        __struct.custom_state = buf.get_u64_le()?;
14641        __struct.lat = buf.get_i32_le()?;
14642        __struct.lon = buf.get_i32_le()?;
14643        __struct.alt = buf.get_f32_le()?;
14644        for v in &mut __struct.vel {
14645            let val = buf.get_f32_le()?;
14646            *v = val;
14647        }
14648        for v in &mut __struct.acc {
14649            let val = buf.get_f32_le()?;
14650            *v = val;
14651        }
14652        for v in &mut __struct.attitude_q {
14653            let val = buf.get_f32_le()?;
14654            *v = val;
14655        }
14656        for v in &mut __struct.rates {
14657            let val = buf.get_f32_le()?;
14658            *v = val;
14659        }
14660        for v in &mut __struct.position_cov {
14661            let val = buf.get_f32_le()?;
14662            *v = val;
14663        }
14664        __struct.est_capabilities = buf.get_u8()?;
14665        Ok(__struct)
14666    }
14667    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14668        let mut __tmp = BytesMut::new(bytes);
14669        #[allow(clippy::absurd_extreme_comparisons)]
14670        #[allow(unused_comparisons)]
14671        if __tmp.remaining() < Self::ENCODED_LEN {
14672            panic!(
14673                "buffer is too small (need {} bytes, but got {})",
14674                Self::ENCODED_LEN,
14675                __tmp.remaining(),
14676            )
14677        }
14678        __tmp.put_u64_le(self.timestamp);
14679        __tmp.put_u64_le(self.custom_state);
14680        __tmp.put_i32_le(self.lat);
14681        __tmp.put_i32_le(self.lon);
14682        __tmp.put_f32_le(self.alt);
14683        for val in &self.vel {
14684            __tmp.put_f32_le(*val);
14685        }
14686        for val in &self.acc {
14687            __tmp.put_f32_le(*val);
14688        }
14689        for val in &self.attitude_q {
14690            __tmp.put_f32_le(*val);
14691        }
14692        for val in &self.rates {
14693            __tmp.put_f32_le(*val);
14694        }
14695        for val in &self.position_cov {
14696            __tmp.put_f32_le(*val);
14697        }
14698        __tmp.put_u8(self.est_capabilities);
14699        if matches!(version, MavlinkVersion::V2) {
14700            let len = __tmp.len();
14701            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14702        } else {
14703            __tmp.len()
14704        }
14705    }
14706}
14707#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
14708#[doc = ""]
14709#[doc = "ID: 371"]
14710#[derive(Debug, Clone, PartialEq)]
14711#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14712#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14713#[cfg_attr(feature = "ts", derive(TS))]
14714#[cfg_attr(feature = "ts", ts(export))]
14715pub struct FUEL_STATUS_DATA {
14716    #[doc = "Capacity when full. Must be provided."]
14717    pub maximum_fuel: f32,
14718    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
14719    pub consumed_fuel: f32,
14720    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
14721    pub remaining_fuel: f32,
14722    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
14723    pub flow_rate: f32,
14724    #[doc = "Fuel temperature. NaN: field not provided."]
14725    pub temperature: f32,
14726    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
14727    pub fuel_type: MavFuelType,
14728    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
14729    pub id: u8,
14730    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
14731    pub percent_remaining: u8,
14732}
14733impl FUEL_STATUS_DATA {
14734    pub const ENCODED_LEN: usize = 26usize;
14735    pub const DEFAULT: Self = Self {
14736        maximum_fuel: 0.0_f32,
14737        consumed_fuel: 0.0_f32,
14738        remaining_fuel: 0.0_f32,
14739        flow_rate: 0.0_f32,
14740        temperature: 0.0_f32,
14741        fuel_type: MavFuelType::DEFAULT,
14742        id: 0_u8,
14743        percent_remaining: 0_u8,
14744    };
14745    #[cfg(feature = "arbitrary")]
14746    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14747        use arbitrary::{Arbitrary, Unstructured};
14748        let mut buf = [0u8; 1024];
14749        rng.fill_bytes(&mut buf);
14750        let mut unstructured = Unstructured::new(&buf);
14751        Self::arbitrary(&mut unstructured).unwrap_or_default()
14752    }
14753}
14754impl Default for FUEL_STATUS_DATA {
14755    fn default() -> Self {
14756        Self::DEFAULT.clone()
14757    }
14758}
14759impl MessageData for FUEL_STATUS_DATA {
14760    type Message = MavMessage;
14761    const ID: u32 = 371u32;
14762    const NAME: &'static str = "FUEL_STATUS";
14763    const EXTRA_CRC: u8 = 10u8;
14764    const ENCODED_LEN: usize = 26usize;
14765    fn deser(
14766        _version: MavlinkVersion,
14767        __input: &[u8],
14768    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14769        let avail_len = __input.len();
14770        let mut payload_buf = [0; Self::ENCODED_LEN];
14771        let mut buf = if avail_len < Self::ENCODED_LEN {
14772            payload_buf[0..avail_len].copy_from_slice(__input);
14773            Bytes::new(&payload_buf)
14774        } else {
14775            Bytes::new(__input)
14776        };
14777        let mut __struct = Self::default();
14778        __struct.maximum_fuel = buf.get_f32_le()?;
14779        __struct.consumed_fuel = buf.get_f32_le()?;
14780        __struct.remaining_fuel = buf.get_f32_le()?;
14781        __struct.flow_rate = buf.get_f32_le()?;
14782        __struct.temperature = buf.get_f32_le()?;
14783        let tmp = buf.get_u32_le()?;
14784        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
14785            ::mavlink_core::error::ParserError::InvalidEnum {
14786                enum_type: "MavFuelType",
14787                value: tmp as u64,
14788            },
14789        )?;
14790        __struct.id = buf.get_u8()?;
14791        __struct.percent_remaining = buf.get_u8()?;
14792        Ok(__struct)
14793    }
14794    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14795        let mut __tmp = BytesMut::new(bytes);
14796        #[allow(clippy::absurd_extreme_comparisons)]
14797        #[allow(unused_comparisons)]
14798        if __tmp.remaining() < Self::ENCODED_LEN {
14799            panic!(
14800                "buffer is too small (need {} bytes, but got {})",
14801                Self::ENCODED_LEN,
14802                __tmp.remaining(),
14803            )
14804        }
14805        __tmp.put_f32_le(self.maximum_fuel);
14806        __tmp.put_f32_le(self.consumed_fuel);
14807        __tmp.put_f32_le(self.remaining_fuel);
14808        __tmp.put_f32_le(self.flow_rate);
14809        __tmp.put_f32_le(self.temperature);
14810        __tmp.put_u32_le(self.fuel_type as u32);
14811        __tmp.put_u8(self.id);
14812        __tmp.put_u8(self.percent_remaining);
14813        if matches!(version, MavlinkVersion::V2) {
14814            let len = __tmp.len();
14815            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14816        } else {
14817            __tmp.len()
14818        }
14819    }
14820}
14821#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
14822#[doc = ""]
14823#[doc = "ID: 373"]
14824#[derive(Debug, Clone, PartialEq)]
14825#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14826#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14827#[cfg_attr(feature = "ts", derive(TS))]
14828#[cfg_attr(feature = "ts", ts(export))]
14829pub struct GENERATOR_STATUS_DATA {
14830    #[doc = "Status flags."]
14831    pub status: MavGeneratorStatusFlag,
14832    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
14833    pub battery_current: f32,
14834    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
14835    pub load_current: f32,
14836    #[doc = "The power being generated. NaN: field not provided"]
14837    pub power_generated: f32,
14838    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
14839    pub bus_voltage: f32,
14840    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
14841    pub bat_current_setpoint: f32,
14842    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
14843    pub runtime: u32,
14844    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
14845    pub time_until_maintenance: i32,
14846    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
14847    pub generator_speed: u16,
14848    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
14849    pub rectifier_temperature: i16,
14850    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
14851    pub generator_temperature: i16,
14852}
14853impl GENERATOR_STATUS_DATA {
14854    pub const ENCODED_LEN: usize = 42usize;
14855    pub const DEFAULT: Self = Self {
14856        status: MavGeneratorStatusFlag::DEFAULT,
14857        battery_current: 0.0_f32,
14858        load_current: 0.0_f32,
14859        power_generated: 0.0_f32,
14860        bus_voltage: 0.0_f32,
14861        bat_current_setpoint: 0.0_f32,
14862        runtime: 0_u32,
14863        time_until_maintenance: 0_i32,
14864        generator_speed: 0_u16,
14865        rectifier_temperature: 0_i16,
14866        generator_temperature: 0_i16,
14867    };
14868    #[cfg(feature = "arbitrary")]
14869    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14870        use arbitrary::{Arbitrary, Unstructured};
14871        let mut buf = [0u8; 1024];
14872        rng.fill_bytes(&mut buf);
14873        let mut unstructured = Unstructured::new(&buf);
14874        Self::arbitrary(&mut unstructured).unwrap_or_default()
14875    }
14876}
14877impl Default for GENERATOR_STATUS_DATA {
14878    fn default() -> Self {
14879        Self::DEFAULT.clone()
14880    }
14881}
14882impl MessageData for GENERATOR_STATUS_DATA {
14883    type Message = MavMessage;
14884    const ID: u32 = 373u32;
14885    const NAME: &'static str = "GENERATOR_STATUS";
14886    const EXTRA_CRC: u8 = 117u8;
14887    const ENCODED_LEN: usize = 42usize;
14888    fn deser(
14889        _version: MavlinkVersion,
14890        __input: &[u8],
14891    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14892        let avail_len = __input.len();
14893        let mut payload_buf = [0; Self::ENCODED_LEN];
14894        let mut buf = if avail_len < Self::ENCODED_LEN {
14895            payload_buf[0..avail_len].copy_from_slice(__input);
14896            Bytes::new(&payload_buf)
14897        } else {
14898            Bytes::new(__input)
14899        };
14900        let mut __struct = Self::default();
14901        let tmp = buf.get_u64_le()?;
14902        __struct.status =
14903            MavGeneratorStatusFlag::from_bits(tmp as <MavGeneratorStatusFlag as Flags>::Bits)
14904                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14905                    flag_type: "MavGeneratorStatusFlag",
14906                    value: tmp as u64,
14907                })?;
14908        __struct.battery_current = buf.get_f32_le()?;
14909        __struct.load_current = buf.get_f32_le()?;
14910        __struct.power_generated = buf.get_f32_le()?;
14911        __struct.bus_voltage = buf.get_f32_le()?;
14912        __struct.bat_current_setpoint = buf.get_f32_le()?;
14913        __struct.runtime = buf.get_u32_le()?;
14914        __struct.time_until_maintenance = buf.get_i32_le()?;
14915        __struct.generator_speed = buf.get_u16_le()?;
14916        __struct.rectifier_temperature = buf.get_i16_le()?;
14917        __struct.generator_temperature = buf.get_i16_le()?;
14918        Ok(__struct)
14919    }
14920    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14921        let mut __tmp = BytesMut::new(bytes);
14922        #[allow(clippy::absurd_extreme_comparisons)]
14923        #[allow(unused_comparisons)]
14924        if __tmp.remaining() < Self::ENCODED_LEN {
14925            panic!(
14926                "buffer is too small (need {} bytes, but got {})",
14927                Self::ENCODED_LEN,
14928                __tmp.remaining(),
14929            )
14930        }
14931        __tmp.put_u64_le(self.status.bits() as u64);
14932        __tmp.put_f32_le(self.battery_current);
14933        __tmp.put_f32_le(self.load_current);
14934        __tmp.put_f32_le(self.power_generated);
14935        __tmp.put_f32_le(self.bus_voltage);
14936        __tmp.put_f32_le(self.bat_current_setpoint);
14937        __tmp.put_u32_le(self.runtime);
14938        __tmp.put_i32_le(self.time_until_maintenance);
14939        __tmp.put_u16_le(self.generator_speed);
14940        __tmp.put_i16_le(self.rectifier_temperature);
14941        __tmp.put_i16_le(self.generator_temperature);
14942        if matches!(version, MavlinkVersion::V2) {
14943            let len = __tmp.len();
14944            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14945        } else {
14946            __tmp.len()
14947        }
14948    }
14949}
14950#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
14951#[doc = ""]
14952#[doc = "ID: 285"]
14953#[derive(Debug, Clone, PartialEq)]
14954#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14955#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14956#[cfg_attr(feature = "ts", derive(TS))]
14957#[cfg_attr(feature = "ts", ts(export))]
14958pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
14959    #[doc = "Timestamp (time since system boot)."]
14960    pub time_boot_ms: u32,
14961    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
14962    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14963    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14964    pub q: [f32; 4],
14965    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
14966    pub angular_velocity_x: f32,
14967    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
14968    pub angular_velocity_y: f32,
14969    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
14970    pub angular_velocity_z: f32,
14971    #[doc = "Failure flags (0 for no failure)"]
14972    pub failure_flags: GimbalDeviceErrorFlags,
14973    #[doc = "Current gimbal flags set."]
14974    pub flags: GimbalDeviceFlags,
14975    #[doc = "System ID"]
14976    pub target_system: u8,
14977    #[doc = "Component ID"]
14978    pub target_component: u8,
14979    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
14980    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14981    pub delta_yaw: f32,
14982    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
14983    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14984    pub delta_yaw_velocity: f32,
14985    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
14986    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14987    pub gimbal_device_id: u8,
14988}
14989impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
14990    pub const ENCODED_LEN: usize = 49usize;
14991    pub const DEFAULT: Self = Self {
14992        time_boot_ms: 0_u32,
14993        q: [0.0_f32; 4usize],
14994        angular_velocity_x: 0.0_f32,
14995        angular_velocity_y: 0.0_f32,
14996        angular_velocity_z: 0.0_f32,
14997        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
14998        flags: GimbalDeviceFlags::DEFAULT,
14999        target_system: 0_u8,
15000        target_component: 0_u8,
15001        delta_yaw: 0.0_f32,
15002        delta_yaw_velocity: 0.0_f32,
15003        gimbal_device_id: 0_u8,
15004    };
15005    #[cfg(feature = "arbitrary")]
15006    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15007        use arbitrary::{Arbitrary, Unstructured};
15008        let mut buf = [0u8; 1024];
15009        rng.fill_bytes(&mut buf);
15010        let mut unstructured = Unstructured::new(&buf);
15011        Self::arbitrary(&mut unstructured).unwrap_or_default()
15012    }
15013}
15014impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
15015    fn default() -> Self {
15016        Self::DEFAULT.clone()
15017    }
15018}
15019impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
15020    type Message = MavMessage;
15021    const ID: u32 = 285u32;
15022    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
15023    const EXTRA_CRC: u8 = 137u8;
15024    const ENCODED_LEN: usize = 49usize;
15025    fn deser(
15026        _version: MavlinkVersion,
15027        __input: &[u8],
15028    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15029        let avail_len = __input.len();
15030        let mut payload_buf = [0; Self::ENCODED_LEN];
15031        let mut buf = if avail_len < Self::ENCODED_LEN {
15032            payload_buf[0..avail_len].copy_from_slice(__input);
15033            Bytes::new(&payload_buf)
15034        } else {
15035            Bytes::new(__input)
15036        };
15037        let mut __struct = Self::default();
15038        __struct.time_boot_ms = buf.get_u32_le()?;
15039        for v in &mut __struct.q {
15040            let val = buf.get_f32_le()?;
15041            *v = val;
15042        }
15043        __struct.angular_velocity_x = buf.get_f32_le()?;
15044        __struct.angular_velocity_y = buf.get_f32_le()?;
15045        __struct.angular_velocity_z = buf.get_f32_le()?;
15046        let tmp = buf.get_u32_le()?;
15047        __struct.failure_flags =
15048            GimbalDeviceErrorFlags::from_bits(tmp as <GimbalDeviceErrorFlags as Flags>::Bits)
15049                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15050                    flag_type: "GimbalDeviceErrorFlags",
15051                    value: tmp as u64,
15052                })?;
15053        let tmp = buf.get_u16_le()?;
15054        __struct.flags = GimbalDeviceFlags::from_bits(tmp as <GimbalDeviceFlags as Flags>::Bits)
15055            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15056                flag_type: "GimbalDeviceFlags",
15057                value: tmp as u64,
15058            })?;
15059        __struct.target_system = buf.get_u8()?;
15060        __struct.target_component = buf.get_u8()?;
15061        __struct.delta_yaw = buf.get_f32_le()?;
15062        __struct.delta_yaw_velocity = buf.get_f32_le()?;
15063        __struct.gimbal_device_id = buf.get_u8()?;
15064        Ok(__struct)
15065    }
15066    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15067        let mut __tmp = BytesMut::new(bytes);
15068        #[allow(clippy::absurd_extreme_comparisons)]
15069        #[allow(unused_comparisons)]
15070        if __tmp.remaining() < Self::ENCODED_LEN {
15071            panic!(
15072                "buffer is too small (need {} bytes, but got {})",
15073                Self::ENCODED_LEN,
15074                __tmp.remaining(),
15075            )
15076        }
15077        __tmp.put_u32_le(self.time_boot_ms);
15078        for val in &self.q {
15079            __tmp.put_f32_le(*val);
15080        }
15081        __tmp.put_f32_le(self.angular_velocity_x);
15082        __tmp.put_f32_le(self.angular_velocity_y);
15083        __tmp.put_f32_le(self.angular_velocity_z);
15084        __tmp.put_u32_le(self.failure_flags.bits() as u32);
15085        __tmp.put_u16_le(self.flags.bits() as u16);
15086        __tmp.put_u8(self.target_system);
15087        __tmp.put_u8(self.target_component);
15088        if matches!(version, MavlinkVersion::V2) {
15089            __tmp.put_f32_le(self.delta_yaw);
15090            __tmp.put_f32_le(self.delta_yaw_velocity);
15091            __tmp.put_u8(self.gimbal_device_id);
15092            let len = __tmp.len();
15093            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15094        } else {
15095            __tmp.len()
15096        }
15097    }
15098}
15099#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
15100#[doc = ""]
15101#[doc = "ID: 283"]
15102#[derive(Debug, Clone, PartialEq)]
15103#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15104#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15105#[cfg_attr(feature = "ts", derive(TS))]
15106#[cfg_attr(feature = "ts", ts(export))]
15107pub struct GIMBAL_DEVICE_INFORMATION_DATA {
15108    #[doc = "UID of gimbal hardware (0 if unknown)."]
15109    pub uid: u64,
15110    #[doc = "Timestamp (time since system boot)."]
15111    pub time_boot_ms: u32,
15112    #[doc = "Version of the gimbal firmware, encoded as: (Dev&amp;0xff)&lt;&lt;24 | (Patch&amp;0xff)&lt;&lt;16 | (Minor&amp;0xff)&lt;&lt;8 | (Major&amp;0xff)."]
15113    pub firmware_version: u32,
15114    #[doc = "Version of the gimbal hardware, encoded as: (Dev&amp;0xff)&lt;&lt;24 | (Patch&amp;0xff)&lt;&lt;16 | (Minor&amp;0xff)&lt;&lt;8 | (Major&amp;0xff)."]
15115    pub hardware_version: u32,
15116    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
15117    pub roll_min: f32,
15118    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
15119    pub roll_max: f32,
15120    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
15121    pub pitch_min: f32,
15122    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
15123    pub pitch_max: f32,
15124    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
15125    pub yaw_min: f32,
15126    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
15127    pub yaw_max: f32,
15128    #[doc = "Bitmap of gimbal capability flags."]
15129    pub cap_flags: GimbalDeviceCapFlags,
15130    #[doc = "Bitmap for use for gimbal-specific capability flags."]
15131    pub custom_cap_flags: u16,
15132    #[doc = "Name of the gimbal vendor."]
15133    #[cfg_attr(feature = "ts", ts(type = "string"))]
15134    pub vendor_name: CharArray<32>,
15135    #[doc = "Name of the gimbal model."]
15136    #[cfg_attr(feature = "ts", ts(type = "string"))]
15137    pub model_name: CharArray<32>,
15138    #[doc = "Custom name of the gimbal given to it by the user."]
15139    #[cfg_attr(feature = "ts", ts(type = "string"))]
15140    pub custom_name: CharArray<32>,
15141    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
15142    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15143    pub gimbal_device_id: u8,
15144}
15145impl GIMBAL_DEVICE_INFORMATION_DATA {
15146    pub const ENCODED_LEN: usize = 145usize;
15147    pub const DEFAULT: Self = Self {
15148        uid: 0_u64,
15149        time_boot_ms: 0_u32,
15150        firmware_version: 0_u32,
15151        hardware_version: 0_u32,
15152        roll_min: 0.0_f32,
15153        roll_max: 0.0_f32,
15154        pitch_min: 0.0_f32,
15155        pitch_max: 0.0_f32,
15156        yaw_min: 0.0_f32,
15157        yaw_max: 0.0_f32,
15158        cap_flags: GimbalDeviceCapFlags::DEFAULT,
15159        custom_cap_flags: 0_u16,
15160        vendor_name: CharArray::new([0_u8; 32usize]),
15161        model_name: CharArray::new([0_u8; 32usize]),
15162        custom_name: CharArray::new([0_u8; 32usize]),
15163        gimbal_device_id: 0_u8,
15164    };
15165    #[cfg(feature = "arbitrary")]
15166    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15167        use arbitrary::{Arbitrary, Unstructured};
15168        let mut buf = [0u8; 1024];
15169        rng.fill_bytes(&mut buf);
15170        let mut unstructured = Unstructured::new(&buf);
15171        Self::arbitrary(&mut unstructured).unwrap_or_default()
15172    }
15173}
15174impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
15175    fn default() -> Self {
15176        Self::DEFAULT.clone()
15177    }
15178}
15179impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
15180    type Message = MavMessage;
15181    const ID: u32 = 283u32;
15182    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
15183    const EXTRA_CRC: u8 = 74u8;
15184    const ENCODED_LEN: usize = 145usize;
15185    fn deser(
15186        _version: MavlinkVersion,
15187        __input: &[u8],
15188    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15189        let avail_len = __input.len();
15190        let mut payload_buf = [0; Self::ENCODED_LEN];
15191        let mut buf = if avail_len < Self::ENCODED_LEN {
15192            payload_buf[0..avail_len].copy_from_slice(__input);
15193            Bytes::new(&payload_buf)
15194        } else {
15195            Bytes::new(__input)
15196        };
15197        let mut __struct = Self::default();
15198        __struct.uid = buf.get_u64_le()?;
15199        __struct.time_boot_ms = buf.get_u32_le()?;
15200        __struct.firmware_version = buf.get_u32_le()?;
15201        __struct.hardware_version = buf.get_u32_le()?;
15202        __struct.roll_min = buf.get_f32_le()?;
15203        __struct.roll_max = buf.get_f32_le()?;
15204        __struct.pitch_min = buf.get_f32_le()?;
15205        __struct.pitch_max = buf.get_f32_le()?;
15206        __struct.yaw_min = buf.get_f32_le()?;
15207        __struct.yaw_max = buf.get_f32_le()?;
15208        let tmp = buf.get_u16_le()?;
15209        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
15210            tmp as <GimbalDeviceCapFlags as Flags>::Bits,
15211        )
15212        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15213            flag_type: "GimbalDeviceCapFlags",
15214            value: tmp as u64,
15215        })?;
15216        __struct.custom_cap_flags = buf.get_u16_le()?;
15217        let mut tmp = [0_u8; 32usize];
15218        for v in &mut tmp {
15219            *v = buf.get_u8()?;
15220        }
15221        __struct.vendor_name = CharArray::new(tmp);
15222        let mut tmp = [0_u8; 32usize];
15223        for v in &mut tmp {
15224            *v = buf.get_u8()?;
15225        }
15226        __struct.model_name = CharArray::new(tmp);
15227        let mut tmp = [0_u8; 32usize];
15228        for v in &mut tmp {
15229            *v = buf.get_u8()?;
15230        }
15231        __struct.custom_name = CharArray::new(tmp);
15232        __struct.gimbal_device_id = buf.get_u8()?;
15233        Ok(__struct)
15234    }
15235    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15236        let mut __tmp = BytesMut::new(bytes);
15237        #[allow(clippy::absurd_extreme_comparisons)]
15238        #[allow(unused_comparisons)]
15239        if __tmp.remaining() < Self::ENCODED_LEN {
15240            panic!(
15241                "buffer is too small (need {} bytes, but got {})",
15242                Self::ENCODED_LEN,
15243                __tmp.remaining(),
15244            )
15245        }
15246        __tmp.put_u64_le(self.uid);
15247        __tmp.put_u32_le(self.time_boot_ms);
15248        __tmp.put_u32_le(self.firmware_version);
15249        __tmp.put_u32_le(self.hardware_version);
15250        __tmp.put_f32_le(self.roll_min);
15251        __tmp.put_f32_le(self.roll_max);
15252        __tmp.put_f32_le(self.pitch_min);
15253        __tmp.put_f32_le(self.pitch_max);
15254        __tmp.put_f32_le(self.yaw_min);
15255        __tmp.put_f32_le(self.yaw_max);
15256        __tmp.put_u16_le(self.cap_flags.bits() as u16);
15257        __tmp.put_u16_le(self.custom_cap_flags);
15258        for val in &self.vendor_name {
15259            __tmp.put_u8(*val);
15260        }
15261        for val in &self.model_name {
15262            __tmp.put_u8(*val);
15263        }
15264        for val in &self.custom_name {
15265            __tmp.put_u8(*val);
15266        }
15267        if matches!(version, MavlinkVersion::V2) {
15268            __tmp.put_u8(self.gimbal_device_id);
15269            let len = __tmp.len();
15270            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15271        } else {
15272            __tmp.len()
15273        }
15274    }
15275}
15276#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
15277#[doc = ""]
15278#[doc = "ID: 284"]
15279#[derive(Debug, Clone, PartialEq)]
15280#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15281#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15282#[cfg_attr(feature = "ts", derive(TS))]
15283#[cfg_attr(feature = "ts", ts(export))]
15284pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
15285    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
15286    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15287    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15288    pub q: [f32; 4],
15289    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
15290    pub angular_velocity_x: f32,
15291    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
15292    pub angular_velocity_y: f32,
15293    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
15294    pub angular_velocity_z: f32,
15295    #[doc = "Low level gimbal flags."]
15296    pub flags: GimbalDeviceFlags,
15297    #[doc = "System ID"]
15298    pub target_system: u8,
15299    #[doc = "Component ID"]
15300    pub target_component: u8,
15301}
15302impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
15303    pub const ENCODED_LEN: usize = 32usize;
15304    pub const DEFAULT: Self = Self {
15305        q: [0.0_f32; 4usize],
15306        angular_velocity_x: 0.0_f32,
15307        angular_velocity_y: 0.0_f32,
15308        angular_velocity_z: 0.0_f32,
15309        flags: GimbalDeviceFlags::DEFAULT,
15310        target_system: 0_u8,
15311        target_component: 0_u8,
15312    };
15313    #[cfg(feature = "arbitrary")]
15314    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15315        use arbitrary::{Arbitrary, Unstructured};
15316        let mut buf = [0u8; 1024];
15317        rng.fill_bytes(&mut buf);
15318        let mut unstructured = Unstructured::new(&buf);
15319        Self::arbitrary(&mut unstructured).unwrap_or_default()
15320    }
15321}
15322impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
15323    fn default() -> Self {
15324        Self::DEFAULT.clone()
15325    }
15326}
15327impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
15328    type Message = MavMessage;
15329    const ID: u32 = 284u32;
15330    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
15331    const EXTRA_CRC: u8 = 99u8;
15332    const ENCODED_LEN: usize = 32usize;
15333    fn deser(
15334        _version: MavlinkVersion,
15335        __input: &[u8],
15336    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15337        let avail_len = __input.len();
15338        let mut payload_buf = [0; Self::ENCODED_LEN];
15339        let mut buf = if avail_len < Self::ENCODED_LEN {
15340            payload_buf[0..avail_len].copy_from_slice(__input);
15341            Bytes::new(&payload_buf)
15342        } else {
15343            Bytes::new(__input)
15344        };
15345        let mut __struct = Self::default();
15346        for v in &mut __struct.q {
15347            let val = buf.get_f32_le()?;
15348            *v = val;
15349        }
15350        __struct.angular_velocity_x = buf.get_f32_le()?;
15351        __struct.angular_velocity_y = buf.get_f32_le()?;
15352        __struct.angular_velocity_z = buf.get_f32_le()?;
15353        let tmp = buf.get_u16_le()?;
15354        __struct.flags = GimbalDeviceFlags::from_bits(tmp as <GimbalDeviceFlags as Flags>::Bits)
15355            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15356                flag_type: "GimbalDeviceFlags",
15357                value: tmp as u64,
15358            })?;
15359        __struct.target_system = buf.get_u8()?;
15360        __struct.target_component = buf.get_u8()?;
15361        Ok(__struct)
15362    }
15363    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15364        let mut __tmp = BytesMut::new(bytes);
15365        #[allow(clippy::absurd_extreme_comparisons)]
15366        #[allow(unused_comparisons)]
15367        if __tmp.remaining() < Self::ENCODED_LEN {
15368            panic!(
15369                "buffer is too small (need {} bytes, but got {})",
15370                Self::ENCODED_LEN,
15371                __tmp.remaining(),
15372            )
15373        }
15374        for val in &self.q {
15375            __tmp.put_f32_le(*val);
15376        }
15377        __tmp.put_f32_le(self.angular_velocity_x);
15378        __tmp.put_f32_le(self.angular_velocity_y);
15379        __tmp.put_f32_le(self.angular_velocity_z);
15380        __tmp.put_u16_le(self.flags.bits() as u16);
15381        __tmp.put_u8(self.target_system);
15382        __tmp.put_u8(self.target_component);
15383        if matches!(version, MavlinkVersion::V2) {
15384            let len = __tmp.len();
15385            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15386        } else {
15387            __tmp.len()
15388        }
15389    }
15390}
15391#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
15392#[doc = ""]
15393#[doc = "ID: 280"]
15394#[derive(Debug, Clone, PartialEq)]
15395#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15396#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15397#[cfg_attr(feature = "ts", derive(TS))]
15398#[cfg_attr(feature = "ts", ts(export))]
15399pub struct GIMBAL_MANAGER_INFORMATION_DATA {
15400    #[doc = "Timestamp (time since system boot)."]
15401    pub time_boot_ms: u32,
15402    #[doc = "Bitmap of gimbal capability flags."]
15403    pub cap_flags: GimbalManagerCapFlags,
15404    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
15405    pub roll_min: f32,
15406    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
15407    pub roll_max: f32,
15408    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
15409    pub pitch_min: f32,
15410    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
15411    pub pitch_max: f32,
15412    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
15413    pub yaw_min: f32,
15414    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
15415    pub yaw_max: f32,
15416    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
15417    pub gimbal_device_id: u8,
15418}
15419impl GIMBAL_MANAGER_INFORMATION_DATA {
15420    pub const ENCODED_LEN: usize = 33usize;
15421    pub const DEFAULT: Self = Self {
15422        time_boot_ms: 0_u32,
15423        cap_flags: GimbalManagerCapFlags::DEFAULT,
15424        roll_min: 0.0_f32,
15425        roll_max: 0.0_f32,
15426        pitch_min: 0.0_f32,
15427        pitch_max: 0.0_f32,
15428        yaw_min: 0.0_f32,
15429        yaw_max: 0.0_f32,
15430        gimbal_device_id: 0_u8,
15431    };
15432    #[cfg(feature = "arbitrary")]
15433    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15434        use arbitrary::{Arbitrary, Unstructured};
15435        let mut buf = [0u8; 1024];
15436        rng.fill_bytes(&mut buf);
15437        let mut unstructured = Unstructured::new(&buf);
15438        Self::arbitrary(&mut unstructured).unwrap_or_default()
15439    }
15440}
15441impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
15442    fn default() -> Self {
15443        Self::DEFAULT.clone()
15444    }
15445}
15446impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
15447    type Message = MavMessage;
15448    const ID: u32 = 280u32;
15449    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
15450    const EXTRA_CRC: u8 = 70u8;
15451    const ENCODED_LEN: usize = 33usize;
15452    fn deser(
15453        _version: MavlinkVersion,
15454        __input: &[u8],
15455    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15456        let avail_len = __input.len();
15457        let mut payload_buf = [0; Self::ENCODED_LEN];
15458        let mut buf = if avail_len < Self::ENCODED_LEN {
15459            payload_buf[0..avail_len].copy_from_slice(__input);
15460            Bytes::new(&payload_buf)
15461        } else {
15462            Bytes::new(__input)
15463        };
15464        let mut __struct = Self::default();
15465        __struct.time_boot_ms = buf.get_u32_le()?;
15466        let tmp = buf.get_u32_le()?;
15467        __struct.cap_flags = GimbalManagerCapFlags::from_bits(
15468            tmp as <GimbalManagerCapFlags as Flags>::Bits,
15469        )
15470        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15471            flag_type: "GimbalManagerCapFlags",
15472            value: tmp as u64,
15473        })?;
15474        __struct.roll_min = buf.get_f32_le()?;
15475        __struct.roll_max = buf.get_f32_le()?;
15476        __struct.pitch_min = buf.get_f32_le()?;
15477        __struct.pitch_max = buf.get_f32_le()?;
15478        __struct.yaw_min = buf.get_f32_le()?;
15479        __struct.yaw_max = buf.get_f32_le()?;
15480        __struct.gimbal_device_id = buf.get_u8()?;
15481        Ok(__struct)
15482    }
15483    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15484        let mut __tmp = BytesMut::new(bytes);
15485        #[allow(clippy::absurd_extreme_comparisons)]
15486        #[allow(unused_comparisons)]
15487        if __tmp.remaining() < Self::ENCODED_LEN {
15488            panic!(
15489                "buffer is too small (need {} bytes, but got {})",
15490                Self::ENCODED_LEN,
15491                __tmp.remaining(),
15492            )
15493        }
15494        __tmp.put_u32_le(self.time_boot_ms);
15495        __tmp.put_u32_le(self.cap_flags.bits() as u32);
15496        __tmp.put_f32_le(self.roll_min);
15497        __tmp.put_f32_le(self.roll_max);
15498        __tmp.put_f32_le(self.pitch_min);
15499        __tmp.put_f32_le(self.pitch_max);
15500        __tmp.put_f32_le(self.yaw_min);
15501        __tmp.put_f32_le(self.yaw_max);
15502        __tmp.put_u8(self.gimbal_device_id);
15503        if matches!(version, MavlinkVersion::V2) {
15504            let len = __tmp.len();
15505            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15506        } else {
15507            __tmp.len()
15508        }
15509    }
15510}
15511#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
15512#[doc = ""]
15513#[doc = "ID: 282"]
15514#[derive(Debug, Clone, PartialEq)]
15515#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15516#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15517#[cfg_attr(feature = "ts", derive(TS))]
15518#[cfg_attr(feature = "ts", ts(export))]
15519pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
15520    #[doc = "High level gimbal manager flags to use."]
15521    pub flags: GimbalManagerFlags,
15522    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
15523    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15524    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15525    pub q: [f32; 4],
15526    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
15527    pub angular_velocity_x: f32,
15528    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
15529    pub angular_velocity_y: f32,
15530    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
15531    pub angular_velocity_z: f32,
15532    #[doc = "System ID"]
15533    pub target_system: u8,
15534    #[doc = "Component ID"]
15535    pub target_component: u8,
15536    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
15537    pub gimbal_device_id: u8,
15538}
15539impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
15540    pub const ENCODED_LEN: usize = 35usize;
15541    pub const DEFAULT: Self = Self {
15542        flags: GimbalManagerFlags::DEFAULT,
15543        q: [0.0_f32; 4usize],
15544        angular_velocity_x: 0.0_f32,
15545        angular_velocity_y: 0.0_f32,
15546        angular_velocity_z: 0.0_f32,
15547        target_system: 0_u8,
15548        target_component: 0_u8,
15549        gimbal_device_id: 0_u8,
15550    };
15551    #[cfg(feature = "arbitrary")]
15552    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15553        use arbitrary::{Arbitrary, Unstructured};
15554        let mut buf = [0u8; 1024];
15555        rng.fill_bytes(&mut buf);
15556        let mut unstructured = Unstructured::new(&buf);
15557        Self::arbitrary(&mut unstructured).unwrap_or_default()
15558    }
15559}
15560impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
15561    fn default() -> Self {
15562        Self::DEFAULT.clone()
15563    }
15564}
15565impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
15566    type Message = MavMessage;
15567    const ID: u32 = 282u32;
15568    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
15569    const EXTRA_CRC: u8 = 123u8;
15570    const ENCODED_LEN: usize = 35usize;
15571    fn deser(
15572        _version: MavlinkVersion,
15573        __input: &[u8],
15574    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15575        let avail_len = __input.len();
15576        let mut payload_buf = [0; Self::ENCODED_LEN];
15577        let mut buf = if avail_len < Self::ENCODED_LEN {
15578            payload_buf[0..avail_len].copy_from_slice(__input);
15579            Bytes::new(&payload_buf)
15580        } else {
15581            Bytes::new(__input)
15582        };
15583        let mut __struct = Self::default();
15584        let tmp = buf.get_u32_le()?;
15585        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
15586            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15587                flag_type: "GimbalManagerFlags",
15588                value: tmp as u64,
15589            })?;
15590        for v in &mut __struct.q {
15591            let val = buf.get_f32_le()?;
15592            *v = val;
15593        }
15594        __struct.angular_velocity_x = buf.get_f32_le()?;
15595        __struct.angular_velocity_y = buf.get_f32_le()?;
15596        __struct.angular_velocity_z = buf.get_f32_le()?;
15597        __struct.target_system = buf.get_u8()?;
15598        __struct.target_component = buf.get_u8()?;
15599        __struct.gimbal_device_id = buf.get_u8()?;
15600        Ok(__struct)
15601    }
15602    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15603        let mut __tmp = BytesMut::new(bytes);
15604        #[allow(clippy::absurd_extreme_comparisons)]
15605        #[allow(unused_comparisons)]
15606        if __tmp.remaining() < Self::ENCODED_LEN {
15607            panic!(
15608                "buffer is too small (need {} bytes, but got {})",
15609                Self::ENCODED_LEN,
15610                __tmp.remaining(),
15611            )
15612        }
15613        __tmp.put_u32_le(self.flags.bits() as u32);
15614        for val in &self.q {
15615            __tmp.put_f32_le(*val);
15616        }
15617        __tmp.put_f32_le(self.angular_velocity_x);
15618        __tmp.put_f32_le(self.angular_velocity_y);
15619        __tmp.put_f32_le(self.angular_velocity_z);
15620        __tmp.put_u8(self.target_system);
15621        __tmp.put_u8(self.target_component);
15622        __tmp.put_u8(self.gimbal_device_id);
15623        if matches!(version, MavlinkVersion::V2) {
15624            let len = __tmp.len();
15625            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15626        } else {
15627            __tmp.len()
15628        }
15629    }
15630}
15631#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
15632#[doc = ""]
15633#[doc = "ID: 288"]
15634#[derive(Debug, Clone, PartialEq)]
15635#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15636#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15637#[cfg_attr(feature = "ts", derive(TS))]
15638#[cfg_attr(feature = "ts", ts(export))]
15639pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
15640    #[doc = "High level gimbal manager flags."]
15641    pub flags: GimbalManagerFlags,
15642    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
15643    pub pitch: f32,
15644    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
15645    pub yaw: f32,
15646    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
15647    pub pitch_rate: f32,
15648    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
15649    pub yaw_rate: f32,
15650    #[doc = "System ID"]
15651    pub target_system: u8,
15652    #[doc = "Component ID"]
15653    pub target_component: u8,
15654    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
15655    pub gimbal_device_id: u8,
15656}
15657impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
15658    pub const ENCODED_LEN: usize = 23usize;
15659    pub const DEFAULT: Self = Self {
15660        flags: GimbalManagerFlags::DEFAULT,
15661        pitch: 0.0_f32,
15662        yaw: 0.0_f32,
15663        pitch_rate: 0.0_f32,
15664        yaw_rate: 0.0_f32,
15665        target_system: 0_u8,
15666        target_component: 0_u8,
15667        gimbal_device_id: 0_u8,
15668    };
15669    #[cfg(feature = "arbitrary")]
15670    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15671        use arbitrary::{Arbitrary, Unstructured};
15672        let mut buf = [0u8; 1024];
15673        rng.fill_bytes(&mut buf);
15674        let mut unstructured = Unstructured::new(&buf);
15675        Self::arbitrary(&mut unstructured).unwrap_or_default()
15676    }
15677}
15678impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
15679    fn default() -> Self {
15680        Self::DEFAULT.clone()
15681    }
15682}
15683impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
15684    type Message = MavMessage;
15685    const ID: u32 = 288u32;
15686    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
15687    const EXTRA_CRC: u8 = 20u8;
15688    const ENCODED_LEN: usize = 23usize;
15689    fn deser(
15690        _version: MavlinkVersion,
15691        __input: &[u8],
15692    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15693        let avail_len = __input.len();
15694        let mut payload_buf = [0; Self::ENCODED_LEN];
15695        let mut buf = if avail_len < Self::ENCODED_LEN {
15696            payload_buf[0..avail_len].copy_from_slice(__input);
15697            Bytes::new(&payload_buf)
15698        } else {
15699            Bytes::new(__input)
15700        };
15701        let mut __struct = Self::default();
15702        let tmp = buf.get_u32_le()?;
15703        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
15704            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15705                flag_type: "GimbalManagerFlags",
15706                value: tmp as u64,
15707            })?;
15708        __struct.pitch = buf.get_f32_le()?;
15709        __struct.yaw = buf.get_f32_le()?;
15710        __struct.pitch_rate = buf.get_f32_le()?;
15711        __struct.yaw_rate = buf.get_f32_le()?;
15712        __struct.target_system = buf.get_u8()?;
15713        __struct.target_component = buf.get_u8()?;
15714        __struct.gimbal_device_id = buf.get_u8()?;
15715        Ok(__struct)
15716    }
15717    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15718        let mut __tmp = BytesMut::new(bytes);
15719        #[allow(clippy::absurd_extreme_comparisons)]
15720        #[allow(unused_comparisons)]
15721        if __tmp.remaining() < Self::ENCODED_LEN {
15722            panic!(
15723                "buffer is too small (need {} bytes, but got {})",
15724                Self::ENCODED_LEN,
15725                __tmp.remaining(),
15726            )
15727        }
15728        __tmp.put_u32_le(self.flags.bits() as u32);
15729        __tmp.put_f32_le(self.pitch);
15730        __tmp.put_f32_le(self.yaw);
15731        __tmp.put_f32_le(self.pitch_rate);
15732        __tmp.put_f32_le(self.yaw_rate);
15733        __tmp.put_u8(self.target_system);
15734        __tmp.put_u8(self.target_component);
15735        __tmp.put_u8(self.gimbal_device_id);
15736        if matches!(version, MavlinkVersion::V2) {
15737            let len = __tmp.len();
15738            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15739        } else {
15740            __tmp.len()
15741        }
15742    }
15743}
15744#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
15745#[doc = ""]
15746#[doc = "ID: 287"]
15747#[derive(Debug, Clone, PartialEq)]
15748#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15749#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15750#[cfg_attr(feature = "ts", derive(TS))]
15751#[cfg_attr(feature = "ts", ts(export))]
15752pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
15753    #[doc = "High level gimbal manager flags to use."]
15754    pub flags: GimbalManagerFlags,
15755    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
15756    pub pitch: f32,
15757    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
15758    pub yaw: f32,
15759    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
15760    pub pitch_rate: f32,
15761    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
15762    pub yaw_rate: f32,
15763    #[doc = "System ID"]
15764    pub target_system: u8,
15765    #[doc = "Component ID"]
15766    pub target_component: u8,
15767    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
15768    pub gimbal_device_id: u8,
15769}
15770impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
15771    pub const ENCODED_LEN: usize = 23usize;
15772    pub const DEFAULT: Self = Self {
15773        flags: GimbalManagerFlags::DEFAULT,
15774        pitch: 0.0_f32,
15775        yaw: 0.0_f32,
15776        pitch_rate: 0.0_f32,
15777        yaw_rate: 0.0_f32,
15778        target_system: 0_u8,
15779        target_component: 0_u8,
15780        gimbal_device_id: 0_u8,
15781    };
15782    #[cfg(feature = "arbitrary")]
15783    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15784        use arbitrary::{Arbitrary, Unstructured};
15785        let mut buf = [0u8; 1024];
15786        rng.fill_bytes(&mut buf);
15787        let mut unstructured = Unstructured::new(&buf);
15788        Self::arbitrary(&mut unstructured).unwrap_or_default()
15789    }
15790}
15791impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
15792    fn default() -> Self {
15793        Self::DEFAULT.clone()
15794    }
15795}
15796impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
15797    type Message = MavMessage;
15798    const ID: u32 = 287u32;
15799    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
15800    const EXTRA_CRC: u8 = 1u8;
15801    const ENCODED_LEN: usize = 23usize;
15802    fn deser(
15803        _version: MavlinkVersion,
15804        __input: &[u8],
15805    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15806        let avail_len = __input.len();
15807        let mut payload_buf = [0; Self::ENCODED_LEN];
15808        let mut buf = if avail_len < Self::ENCODED_LEN {
15809            payload_buf[0..avail_len].copy_from_slice(__input);
15810            Bytes::new(&payload_buf)
15811        } else {
15812            Bytes::new(__input)
15813        };
15814        let mut __struct = Self::default();
15815        let tmp = buf.get_u32_le()?;
15816        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
15817            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15818                flag_type: "GimbalManagerFlags",
15819                value: tmp as u64,
15820            })?;
15821        __struct.pitch = buf.get_f32_le()?;
15822        __struct.yaw = buf.get_f32_le()?;
15823        __struct.pitch_rate = buf.get_f32_le()?;
15824        __struct.yaw_rate = buf.get_f32_le()?;
15825        __struct.target_system = buf.get_u8()?;
15826        __struct.target_component = buf.get_u8()?;
15827        __struct.gimbal_device_id = buf.get_u8()?;
15828        Ok(__struct)
15829    }
15830    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15831        let mut __tmp = BytesMut::new(bytes);
15832        #[allow(clippy::absurd_extreme_comparisons)]
15833        #[allow(unused_comparisons)]
15834        if __tmp.remaining() < Self::ENCODED_LEN {
15835            panic!(
15836                "buffer is too small (need {} bytes, but got {})",
15837                Self::ENCODED_LEN,
15838                __tmp.remaining(),
15839            )
15840        }
15841        __tmp.put_u32_le(self.flags.bits() as u32);
15842        __tmp.put_f32_le(self.pitch);
15843        __tmp.put_f32_le(self.yaw);
15844        __tmp.put_f32_le(self.pitch_rate);
15845        __tmp.put_f32_le(self.yaw_rate);
15846        __tmp.put_u8(self.target_system);
15847        __tmp.put_u8(self.target_component);
15848        __tmp.put_u8(self.gimbal_device_id);
15849        if matches!(version, MavlinkVersion::V2) {
15850            let len = __tmp.len();
15851            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15852        } else {
15853            __tmp.len()
15854        }
15855    }
15856}
15857#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
15858#[doc = ""]
15859#[doc = "ID: 281"]
15860#[derive(Debug, Clone, PartialEq)]
15861#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15862#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15863#[cfg_attr(feature = "ts", derive(TS))]
15864#[cfg_attr(feature = "ts", ts(export))]
15865pub struct GIMBAL_MANAGER_STATUS_DATA {
15866    #[doc = "Timestamp (time since system boot)."]
15867    pub time_boot_ms: u32,
15868    #[doc = "High level gimbal manager flags currently applied."]
15869    pub flags: GimbalManagerFlags,
15870    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
15871    pub gimbal_device_id: u8,
15872    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
15873    pub primary_control_sysid: u8,
15874    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
15875    pub primary_control_compid: u8,
15876    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
15877    pub secondary_control_sysid: u8,
15878    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
15879    pub secondary_control_compid: u8,
15880}
15881impl GIMBAL_MANAGER_STATUS_DATA {
15882    pub const ENCODED_LEN: usize = 13usize;
15883    pub const DEFAULT: Self = Self {
15884        time_boot_ms: 0_u32,
15885        flags: GimbalManagerFlags::DEFAULT,
15886        gimbal_device_id: 0_u8,
15887        primary_control_sysid: 0_u8,
15888        primary_control_compid: 0_u8,
15889        secondary_control_sysid: 0_u8,
15890        secondary_control_compid: 0_u8,
15891    };
15892    #[cfg(feature = "arbitrary")]
15893    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15894        use arbitrary::{Arbitrary, Unstructured};
15895        let mut buf = [0u8; 1024];
15896        rng.fill_bytes(&mut buf);
15897        let mut unstructured = Unstructured::new(&buf);
15898        Self::arbitrary(&mut unstructured).unwrap_or_default()
15899    }
15900}
15901impl Default for GIMBAL_MANAGER_STATUS_DATA {
15902    fn default() -> Self {
15903        Self::DEFAULT.clone()
15904    }
15905}
15906impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
15907    type Message = MavMessage;
15908    const ID: u32 = 281u32;
15909    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
15910    const EXTRA_CRC: u8 = 48u8;
15911    const ENCODED_LEN: usize = 13usize;
15912    fn deser(
15913        _version: MavlinkVersion,
15914        __input: &[u8],
15915    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15916        let avail_len = __input.len();
15917        let mut payload_buf = [0; Self::ENCODED_LEN];
15918        let mut buf = if avail_len < Self::ENCODED_LEN {
15919            payload_buf[0..avail_len].copy_from_slice(__input);
15920            Bytes::new(&payload_buf)
15921        } else {
15922            Bytes::new(__input)
15923        };
15924        let mut __struct = Self::default();
15925        __struct.time_boot_ms = buf.get_u32_le()?;
15926        let tmp = buf.get_u32_le()?;
15927        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
15928            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15929                flag_type: "GimbalManagerFlags",
15930                value: tmp as u64,
15931            })?;
15932        __struct.gimbal_device_id = buf.get_u8()?;
15933        __struct.primary_control_sysid = buf.get_u8()?;
15934        __struct.primary_control_compid = buf.get_u8()?;
15935        __struct.secondary_control_sysid = buf.get_u8()?;
15936        __struct.secondary_control_compid = buf.get_u8()?;
15937        Ok(__struct)
15938    }
15939    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15940        let mut __tmp = BytesMut::new(bytes);
15941        #[allow(clippy::absurd_extreme_comparisons)]
15942        #[allow(unused_comparisons)]
15943        if __tmp.remaining() < Self::ENCODED_LEN {
15944            panic!(
15945                "buffer is too small (need {} bytes, but got {})",
15946                Self::ENCODED_LEN,
15947                __tmp.remaining(),
15948            )
15949        }
15950        __tmp.put_u32_le(self.time_boot_ms);
15951        __tmp.put_u32_le(self.flags.bits() as u32);
15952        __tmp.put_u8(self.gimbal_device_id);
15953        __tmp.put_u8(self.primary_control_sysid);
15954        __tmp.put_u8(self.primary_control_compid);
15955        __tmp.put_u8(self.secondary_control_sysid);
15956        __tmp.put_u8(self.secondary_control_compid);
15957        if matches!(version, MavlinkVersion::V2) {
15958            let len = __tmp.len();
15959            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15960        } else {
15961            __tmp.len()
15962        }
15963    }
15964}
15965#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
15966#[doc = ""]
15967#[doc = "ID: 33"]
15968#[derive(Debug, Clone, PartialEq)]
15969#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15970#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15971#[cfg_attr(feature = "ts", derive(TS))]
15972#[cfg_attr(feature = "ts", ts(export))]
15973pub struct GLOBAL_POSITION_INT_DATA {
15974    #[doc = "Timestamp (time since system boot)."]
15975    pub time_boot_ms: u32,
15976    #[doc = "Latitude, expressed"]
15977    pub lat: i32,
15978    #[doc = "Longitude, expressed"]
15979    pub lon: i32,
15980    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
15981    pub alt: i32,
15982    #[doc = "Altitude above home"]
15983    pub relative_alt: i32,
15984    #[doc = "Ground X Speed (Latitude, positive north)"]
15985    pub vx: i16,
15986    #[doc = "Ground Y Speed (Longitude, positive east)"]
15987    pub vy: i16,
15988    #[doc = "Ground Z Speed (Altitude, positive down)"]
15989    pub vz: i16,
15990    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
15991    pub hdg: u16,
15992}
15993impl GLOBAL_POSITION_INT_DATA {
15994    pub const ENCODED_LEN: usize = 28usize;
15995    pub const DEFAULT: Self = Self {
15996        time_boot_ms: 0_u32,
15997        lat: 0_i32,
15998        lon: 0_i32,
15999        alt: 0_i32,
16000        relative_alt: 0_i32,
16001        vx: 0_i16,
16002        vy: 0_i16,
16003        vz: 0_i16,
16004        hdg: 0_u16,
16005    };
16006    #[cfg(feature = "arbitrary")]
16007    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16008        use arbitrary::{Arbitrary, Unstructured};
16009        let mut buf = [0u8; 1024];
16010        rng.fill_bytes(&mut buf);
16011        let mut unstructured = Unstructured::new(&buf);
16012        Self::arbitrary(&mut unstructured).unwrap_or_default()
16013    }
16014}
16015impl Default for GLOBAL_POSITION_INT_DATA {
16016    fn default() -> Self {
16017        Self::DEFAULT.clone()
16018    }
16019}
16020impl MessageData for GLOBAL_POSITION_INT_DATA {
16021    type Message = MavMessage;
16022    const ID: u32 = 33u32;
16023    const NAME: &'static str = "GLOBAL_POSITION_INT";
16024    const EXTRA_CRC: u8 = 104u8;
16025    const ENCODED_LEN: usize = 28usize;
16026    fn deser(
16027        _version: MavlinkVersion,
16028        __input: &[u8],
16029    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16030        let avail_len = __input.len();
16031        let mut payload_buf = [0; Self::ENCODED_LEN];
16032        let mut buf = if avail_len < Self::ENCODED_LEN {
16033            payload_buf[0..avail_len].copy_from_slice(__input);
16034            Bytes::new(&payload_buf)
16035        } else {
16036            Bytes::new(__input)
16037        };
16038        let mut __struct = Self::default();
16039        __struct.time_boot_ms = buf.get_u32_le()?;
16040        __struct.lat = buf.get_i32_le()?;
16041        __struct.lon = buf.get_i32_le()?;
16042        __struct.alt = buf.get_i32_le()?;
16043        __struct.relative_alt = buf.get_i32_le()?;
16044        __struct.vx = buf.get_i16_le()?;
16045        __struct.vy = buf.get_i16_le()?;
16046        __struct.vz = buf.get_i16_le()?;
16047        __struct.hdg = buf.get_u16_le()?;
16048        Ok(__struct)
16049    }
16050    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16051        let mut __tmp = BytesMut::new(bytes);
16052        #[allow(clippy::absurd_extreme_comparisons)]
16053        #[allow(unused_comparisons)]
16054        if __tmp.remaining() < Self::ENCODED_LEN {
16055            panic!(
16056                "buffer is too small (need {} bytes, but got {})",
16057                Self::ENCODED_LEN,
16058                __tmp.remaining(),
16059            )
16060        }
16061        __tmp.put_u32_le(self.time_boot_ms);
16062        __tmp.put_i32_le(self.lat);
16063        __tmp.put_i32_le(self.lon);
16064        __tmp.put_i32_le(self.alt);
16065        __tmp.put_i32_le(self.relative_alt);
16066        __tmp.put_i16_le(self.vx);
16067        __tmp.put_i16_le(self.vy);
16068        __tmp.put_i16_le(self.vz);
16069        __tmp.put_u16_le(self.hdg);
16070        if matches!(version, MavlinkVersion::V2) {
16071            let len = __tmp.len();
16072            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16073        } else {
16074            __tmp.len()
16075        }
16076    }
16077}
16078#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
16079#[doc = ""]
16080#[doc = "ID: 63"]
16081#[derive(Debug, Clone, PartialEq)]
16082#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16083#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16084#[cfg_attr(feature = "ts", derive(TS))]
16085#[cfg_attr(feature = "ts", ts(export))]
16086pub struct GLOBAL_POSITION_INT_COV_DATA {
16087    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16088    pub time_usec: u64,
16089    #[doc = "Latitude"]
16090    pub lat: i32,
16091    #[doc = "Longitude"]
16092    pub lon: i32,
16093    #[doc = "Altitude in meters above MSL"]
16094    pub alt: i32,
16095    #[doc = "Altitude above ground"]
16096    pub relative_alt: i32,
16097    #[doc = "Ground X Speed (Latitude)"]
16098    pub vx: f32,
16099    #[doc = "Ground Y Speed (Longitude)"]
16100    pub vy: f32,
16101    #[doc = "Ground Z Speed (Altitude)"]
16102    pub vz: f32,
16103    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
16104    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16105    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16106    pub covariance: [f32; 36],
16107    #[doc = "Class id of the estimator this estimate originated from."]
16108    pub estimator_type: MavEstimatorType,
16109}
16110impl GLOBAL_POSITION_INT_COV_DATA {
16111    pub const ENCODED_LEN: usize = 181usize;
16112    pub const DEFAULT: Self = Self {
16113        time_usec: 0_u64,
16114        lat: 0_i32,
16115        lon: 0_i32,
16116        alt: 0_i32,
16117        relative_alt: 0_i32,
16118        vx: 0.0_f32,
16119        vy: 0.0_f32,
16120        vz: 0.0_f32,
16121        covariance: [0.0_f32; 36usize],
16122        estimator_type: MavEstimatorType::DEFAULT,
16123    };
16124    #[cfg(feature = "arbitrary")]
16125    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16126        use arbitrary::{Arbitrary, Unstructured};
16127        let mut buf = [0u8; 1024];
16128        rng.fill_bytes(&mut buf);
16129        let mut unstructured = Unstructured::new(&buf);
16130        Self::arbitrary(&mut unstructured).unwrap_or_default()
16131    }
16132}
16133impl Default for GLOBAL_POSITION_INT_COV_DATA {
16134    fn default() -> Self {
16135        Self::DEFAULT.clone()
16136    }
16137}
16138impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
16139    type Message = MavMessage;
16140    const ID: u32 = 63u32;
16141    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
16142    const EXTRA_CRC: u8 = 119u8;
16143    const ENCODED_LEN: usize = 181usize;
16144    fn deser(
16145        _version: MavlinkVersion,
16146        __input: &[u8],
16147    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16148        let avail_len = __input.len();
16149        let mut payload_buf = [0; Self::ENCODED_LEN];
16150        let mut buf = if avail_len < Self::ENCODED_LEN {
16151            payload_buf[0..avail_len].copy_from_slice(__input);
16152            Bytes::new(&payload_buf)
16153        } else {
16154            Bytes::new(__input)
16155        };
16156        let mut __struct = Self::default();
16157        __struct.time_usec = buf.get_u64_le()?;
16158        __struct.lat = buf.get_i32_le()?;
16159        __struct.lon = buf.get_i32_le()?;
16160        __struct.alt = buf.get_i32_le()?;
16161        __struct.relative_alt = buf.get_i32_le()?;
16162        __struct.vx = buf.get_f32_le()?;
16163        __struct.vy = buf.get_f32_le()?;
16164        __struct.vz = buf.get_f32_le()?;
16165        for v in &mut __struct.covariance {
16166            let val = buf.get_f32_le()?;
16167            *v = val;
16168        }
16169        let tmp = buf.get_u8()?;
16170        __struct.estimator_type =
16171            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16172                enum_type: "MavEstimatorType",
16173                value: tmp as u64,
16174            })?;
16175        Ok(__struct)
16176    }
16177    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16178        let mut __tmp = BytesMut::new(bytes);
16179        #[allow(clippy::absurd_extreme_comparisons)]
16180        #[allow(unused_comparisons)]
16181        if __tmp.remaining() < Self::ENCODED_LEN {
16182            panic!(
16183                "buffer is too small (need {} bytes, but got {})",
16184                Self::ENCODED_LEN,
16185                __tmp.remaining(),
16186            )
16187        }
16188        __tmp.put_u64_le(self.time_usec);
16189        __tmp.put_i32_le(self.lat);
16190        __tmp.put_i32_le(self.lon);
16191        __tmp.put_i32_le(self.alt);
16192        __tmp.put_i32_le(self.relative_alt);
16193        __tmp.put_f32_le(self.vx);
16194        __tmp.put_f32_le(self.vy);
16195        __tmp.put_f32_le(self.vz);
16196        for val in &self.covariance {
16197            __tmp.put_f32_le(*val);
16198        }
16199        __tmp.put_u8(self.estimator_type as u8);
16200        if matches!(version, MavlinkVersion::V2) {
16201            let len = __tmp.len();
16202            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16203        } else {
16204            __tmp.len()
16205        }
16206    }
16207}
16208#[doc = "Global position/attitude estimate from a vision source."]
16209#[doc = ""]
16210#[doc = "ID: 101"]
16211#[derive(Debug, Clone, PartialEq)]
16212#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16213#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16214#[cfg_attr(feature = "ts", derive(TS))]
16215#[cfg_attr(feature = "ts", ts(export))]
16216pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
16217    #[doc = "Timestamp (UNIX time or since system boot)"]
16218    pub usec: u64,
16219    #[doc = "Global X position"]
16220    pub x: f32,
16221    #[doc = "Global Y position"]
16222    pub y: f32,
16223    #[doc = "Global Z position"]
16224    pub z: f32,
16225    #[doc = "Roll angle"]
16226    pub roll: f32,
16227    #[doc = "Pitch angle"]
16228    pub pitch: f32,
16229    #[doc = "Yaw angle"]
16230    pub yaw: f32,
16231    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
16232    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16233    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16234    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16235    pub covariance: [f32; 21],
16236    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
16237    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16238    pub reset_counter: u8,
16239}
16240impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
16241    pub const ENCODED_LEN: usize = 117usize;
16242    pub const DEFAULT: Self = Self {
16243        usec: 0_u64,
16244        x: 0.0_f32,
16245        y: 0.0_f32,
16246        z: 0.0_f32,
16247        roll: 0.0_f32,
16248        pitch: 0.0_f32,
16249        yaw: 0.0_f32,
16250        covariance: [0.0_f32; 21usize],
16251        reset_counter: 0_u8,
16252    };
16253    #[cfg(feature = "arbitrary")]
16254    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16255        use arbitrary::{Arbitrary, Unstructured};
16256        let mut buf = [0u8; 1024];
16257        rng.fill_bytes(&mut buf);
16258        let mut unstructured = Unstructured::new(&buf);
16259        Self::arbitrary(&mut unstructured).unwrap_or_default()
16260    }
16261}
16262impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
16263    fn default() -> Self {
16264        Self::DEFAULT.clone()
16265    }
16266}
16267impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
16268    type Message = MavMessage;
16269    const ID: u32 = 101u32;
16270    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
16271    const EXTRA_CRC: u8 = 102u8;
16272    const ENCODED_LEN: usize = 117usize;
16273    fn deser(
16274        _version: MavlinkVersion,
16275        __input: &[u8],
16276    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16277        let avail_len = __input.len();
16278        let mut payload_buf = [0; Self::ENCODED_LEN];
16279        let mut buf = if avail_len < Self::ENCODED_LEN {
16280            payload_buf[0..avail_len].copy_from_slice(__input);
16281            Bytes::new(&payload_buf)
16282        } else {
16283            Bytes::new(__input)
16284        };
16285        let mut __struct = Self::default();
16286        __struct.usec = buf.get_u64_le()?;
16287        __struct.x = buf.get_f32_le()?;
16288        __struct.y = buf.get_f32_le()?;
16289        __struct.z = buf.get_f32_le()?;
16290        __struct.roll = buf.get_f32_le()?;
16291        __struct.pitch = buf.get_f32_le()?;
16292        __struct.yaw = buf.get_f32_le()?;
16293        for v in &mut __struct.covariance {
16294            let val = buf.get_f32_le()?;
16295            *v = val;
16296        }
16297        __struct.reset_counter = buf.get_u8()?;
16298        Ok(__struct)
16299    }
16300    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16301        let mut __tmp = BytesMut::new(bytes);
16302        #[allow(clippy::absurd_extreme_comparisons)]
16303        #[allow(unused_comparisons)]
16304        if __tmp.remaining() < Self::ENCODED_LEN {
16305            panic!(
16306                "buffer is too small (need {} bytes, but got {})",
16307                Self::ENCODED_LEN,
16308                __tmp.remaining(),
16309            )
16310        }
16311        __tmp.put_u64_le(self.usec);
16312        __tmp.put_f32_le(self.x);
16313        __tmp.put_f32_le(self.y);
16314        __tmp.put_f32_le(self.z);
16315        __tmp.put_f32_le(self.roll);
16316        __tmp.put_f32_le(self.pitch);
16317        __tmp.put_f32_le(self.yaw);
16318        if matches!(version, MavlinkVersion::V2) {
16319            for val in &self.covariance {
16320                __tmp.put_f32_le(*val);
16321            }
16322            __tmp.put_u8(self.reset_counter);
16323            let len = __tmp.len();
16324            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16325        } else {
16326            __tmp.len()
16327        }
16328    }
16329}
16330#[doc = "Second GPS data."]
16331#[doc = ""]
16332#[doc = "ID: 124"]
16333#[derive(Debug, Clone, PartialEq)]
16334#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16335#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16336#[cfg_attr(feature = "ts", derive(TS))]
16337#[cfg_attr(feature = "ts", ts(export))]
16338pub struct GPS2_RAW_DATA {
16339    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16340    pub time_usec: u64,
16341    #[doc = "Latitude (WGS84)"]
16342    pub lat: i32,
16343    #[doc = "Longitude (WGS84)"]
16344    pub lon: i32,
16345    #[doc = "Altitude (MSL). Positive for up."]
16346    pub alt: i32,
16347    #[doc = "Age of DGPS info"]
16348    pub dgps_age: u32,
16349    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16350    pub eph: u16,
16351    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16352    pub epv: u16,
16353    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
16354    pub vel: u16,
16355    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
16356    pub cog: u16,
16357    #[doc = "GPS fix type."]
16358    pub fix_type: GpsFixType,
16359    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
16360    pub satellites_visible: u8,
16361    #[doc = "Number of DGPS satellites"]
16362    pub dgps_numch: u8,
16363    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
16364    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16365    pub yaw: u16,
16366    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
16367    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16368    pub alt_ellipsoid: i32,
16369    #[doc = "Position uncertainty."]
16370    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16371    pub h_acc: u32,
16372    #[doc = "Altitude uncertainty."]
16373    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16374    pub v_acc: u32,
16375    #[doc = "Speed uncertainty."]
16376    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16377    pub vel_acc: u32,
16378    #[doc = "Heading / track uncertainty"]
16379    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16380    pub hdg_acc: u32,
16381}
16382impl GPS2_RAW_DATA {
16383    pub const ENCODED_LEN: usize = 57usize;
16384    pub const DEFAULT: Self = Self {
16385        time_usec: 0_u64,
16386        lat: 0_i32,
16387        lon: 0_i32,
16388        alt: 0_i32,
16389        dgps_age: 0_u32,
16390        eph: 0_u16,
16391        epv: 0_u16,
16392        vel: 0_u16,
16393        cog: 0_u16,
16394        fix_type: GpsFixType::DEFAULT,
16395        satellites_visible: 0_u8,
16396        dgps_numch: 0_u8,
16397        yaw: 0_u16,
16398        alt_ellipsoid: 0_i32,
16399        h_acc: 0_u32,
16400        v_acc: 0_u32,
16401        vel_acc: 0_u32,
16402        hdg_acc: 0_u32,
16403    };
16404    #[cfg(feature = "arbitrary")]
16405    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16406        use arbitrary::{Arbitrary, Unstructured};
16407        let mut buf = [0u8; 1024];
16408        rng.fill_bytes(&mut buf);
16409        let mut unstructured = Unstructured::new(&buf);
16410        Self::arbitrary(&mut unstructured).unwrap_or_default()
16411    }
16412}
16413impl Default for GPS2_RAW_DATA {
16414    fn default() -> Self {
16415        Self::DEFAULT.clone()
16416    }
16417}
16418impl MessageData for GPS2_RAW_DATA {
16419    type Message = MavMessage;
16420    const ID: u32 = 124u32;
16421    const NAME: &'static str = "GPS2_RAW";
16422    const EXTRA_CRC: u8 = 87u8;
16423    const ENCODED_LEN: usize = 57usize;
16424    fn deser(
16425        _version: MavlinkVersion,
16426        __input: &[u8],
16427    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16428        let avail_len = __input.len();
16429        let mut payload_buf = [0; Self::ENCODED_LEN];
16430        let mut buf = if avail_len < Self::ENCODED_LEN {
16431            payload_buf[0..avail_len].copy_from_slice(__input);
16432            Bytes::new(&payload_buf)
16433        } else {
16434            Bytes::new(__input)
16435        };
16436        let mut __struct = Self::default();
16437        __struct.time_usec = buf.get_u64_le()?;
16438        __struct.lat = buf.get_i32_le()?;
16439        __struct.lon = buf.get_i32_le()?;
16440        __struct.alt = buf.get_i32_le()?;
16441        __struct.dgps_age = buf.get_u32_le()?;
16442        __struct.eph = buf.get_u16_le()?;
16443        __struct.epv = buf.get_u16_le()?;
16444        __struct.vel = buf.get_u16_le()?;
16445        __struct.cog = buf.get_u16_le()?;
16446        let tmp = buf.get_u8()?;
16447        __struct.fix_type =
16448            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16449                enum_type: "GpsFixType",
16450                value: tmp as u64,
16451            })?;
16452        __struct.satellites_visible = buf.get_u8()?;
16453        __struct.dgps_numch = buf.get_u8()?;
16454        __struct.yaw = buf.get_u16_le()?;
16455        __struct.alt_ellipsoid = buf.get_i32_le()?;
16456        __struct.h_acc = buf.get_u32_le()?;
16457        __struct.v_acc = buf.get_u32_le()?;
16458        __struct.vel_acc = buf.get_u32_le()?;
16459        __struct.hdg_acc = buf.get_u32_le()?;
16460        Ok(__struct)
16461    }
16462    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16463        let mut __tmp = BytesMut::new(bytes);
16464        #[allow(clippy::absurd_extreme_comparisons)]
16465        #[allow(unused_comparisons)]
16466        if __tmp.remaining() < Self::ENCODED_LEN {
16467            panic!(
16468                "buffer is too small (need {} bytes, but got {})",
16469                Self::ENCODED_LEN,
16470                __tmp.remaining(),
16471            )
16472        }
16473        __tmp.put_u64_le(self.time_usec);
16474        __tmp.put_i32_le(self.lat);
16475        __tmp.put_i32_le(self.lon);
16476        __tmp.put_i32_le(self.alt);
16477        __tmp.put_u32_le(self.dgps_age);
16478        __tmp.put_u16_le(self.eph);
16479        __tmp.put_u16_le(self.epv);
16480        __tmp.put_u16_le(self.vel);
16481        __tmp.put_u16_le(self.cog);
16482        __tmp.put_u8(self.fix_type as u8);
16483        __tmp.put_u8(self.satellites_visible);
16484        __tmp.put_u8(self.dgps_numch);
16485        if matches!(version, MavlinkVersion::V2) {
16486            __tmp.put_u16_le(self.yaw);
16487            __tmp.put_i32_le(self.alt_ellipsoid);
16488            __tmp.put_u32_le(self.h_acc);
16489            __tmp.put_u32_le(self.v_acc);
16490            __tmp.put_u32_le(self.vel_acc);
16491            __tmp.put_u32_le(self.hdg_acc);
16492            let len = __tmp.len();
16493            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16494        } else {
16495            __tmp.len()
16496        }
16497    }
16498}
16499#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
16500#[doc = ""]
16501#[doc = "ID: 128"]
16502#[derive(Debug, Clone, PartialEq)]
16503#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16504#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16505#[cfg_attr(feature = "ts", derive(TS))]
16506#[cfg_attr(feature = "ts", ts(export))]
16507pub struct GPS2_RTK_DATA {
16508    #[doc = "Time since boot of last baseline message received."]
16509    pub time_last_baseline_ms: u32,
16510    #[doc = "GPS Time of Week of last baseline"]
16511    pub tow: u32,
16512    #[doc = "Current baseline in ECEF x or NED north component."]
16513    pub baseline_a_mm: i32,
16514    #[doc = "Current baseline in ECEF y or NED east component."]
16515    pub baseline_b_mm: i32,
16516    #[doc = "Current baseline in ECEF z or NED down component."]
16517    pub baseline_c_mm: i32,
16518    #[doc = "Current estimate of baseline accuracy."]
16519    pub accuracy: u32,
16520    #[doc = "Current number of integer ambiguity hypotheses."]
16521    pub iar_num_hypotheses: i32,
16522    #[doc = "GPS Week Number of last baseline"]
16523    pub wn: u16,
16524    #[doc = "Identification of connected RTK receiver."]
16525    pub rtk_receiver_id: u8,
16526    #[doc = "GPS-specific health report for RTK data."]
16527    pub rtk_health: u8,
16528    #[doc = "Rate of baseline messages being received by GPS"]
16529    pub rtk_rate: u8,
16530    #[doc = "Current number of sats used for RTK calculation."]
16531    pub nsats: u8,
16532    #[doc = "Coordinate system of baseline"]
16533    pub baseline_coords_type: RtkBaselineCoordinateSystem,
16534}
16535impl GPS2_RTK_DATA {
16536    pub const ENCODED_LEN: usize = 35usize;
16537    pub const DEFAULT: Self = Self {
16538        time_last_baseline_ms: 0_u32,
16539        tow: 0_u32,
16540        baseline_a_mm: 0_i32,
16541        baseline_b_mm: 0_i32,
16542        baseline_c_mm: 0_i32,
16543        accuracy: 0_u32,
16544        iar_num_hypotheses: 0_i32,
16545        wn: 0_u16,
16546        rtk_receiver_id: 0_u8,
16547        rtk_health: 0_u8,
16548        rtk_rate: 0_u8,
16549        nsats: 0_u8,
16550        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
16551    };
16552    #[cfg(feature = "arbitrary")]
16553    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16554        use arbitrary::{Arbitrary, Unstructured};
16555        let mut buf = [0u8; 1024];
16556        rng.fill_bytes(&mut buf);
16557        let mut unstructured = Unstructured::new(&buf);
16558        Self::arbitrary(&mut unstructured).unwrap_or_default()
16559    }
16560}
16561impl Default for GPS2_RTK_DATA {
16562    fn default() -> Self {
16563        Self::DEFAULT.clone()
16564    }
16565}
16566impl MessageData for GPS2_RTK_DATA {
16567    type Message = MavMessage;
16568    const ID: u32 = 128u32;
16569    const NAME: &'static str = "GPS2_RTK";
16570    const EXTRA_CRC: u8 = 226u8;
16571    const ENCODED_LEN: usize = 35usize;
16572    fn deser(
16573        _version: MavlinkVersion,
16574        __input: &[u8],
16575    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16576        let avail_len = __input.len();
16577        let mut payload_buf = [0; Self::ENCODED_LEN];
16578        let mut buf = if avail_len < Self::ENCODED_LEN {
16579            payload_buf[0..avail_len].copy_from_slice(__input);
16580            Bytes::new(&payload_buf)
16581        } else {
16582            Bytes::new(__input)
16583        };
16584        let mut __struct = Self::default();
16585        __struct.time_last_baseline_ms = buf.get_u32_le()?;
16586        __struct.tow = buf.get_u32_le()?;
16587        __struct.baseline_a_mm = buf.get_i32_le()?;
16588        __struct.baseline_b_mm = buf.get_i32_le()?;
16589        __struct.baseline_c_mm = buf.get_i32_le()?;
16590        __struct.accuracy = buf.get_u32_le()?;
16591        __struct.iar_num_hypotheses = buf.get_i32_le()?;
16592        __struct.wn = buf.get_u16_le()?;
16593        __struct.rtk_receiver_id = buf.get_u8()?;
16594        __struct.rtk_health = buf.get_u8()?;
16595        __struct.rtk_rate = buf.get_u8()?;
16596        __struct.nsats = buf.get_u8()?;
16597        let tmp = buf.get_u8()?;
16598        __struct.baseline_coords_type =
16599            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16600                enum_type: "RtkBaselineCoordinateSystem",
16601                value: tmp as u64,
16602            })?;
16603        Ok(__struct)
16604    }
16605    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16606        let mut __tmp = BytesMut::new(bytes);
16607        #[allow(clippy::absurd_extreme_comparisons)]
16608        #[allow(unused_comparisons)]
16609        if __tmp.remaining() < Self::ENCODED_LEN {
16610            panic!(
16611                "buffer is too small (need {} bytes, but got {})",
16612                Self::ENCODED_LEN,
16613                __tmp.remaining(),
16614            )
16615        }
16616        __tmp.put_u32_le(self.time_last_baseline_ms);
16617        __tmp.put_u32_le(self.tow);
16618        __tmp.put_i32_le(self.baseline_a_mm);
16619        __tmp.put_i32_le(self.baseline_b_mm);
16620        __tmp.put_i32_le(self.baseline_c_mm);
16621        __tmp.put_u32_le(self.accuracy);
16622        __tmp.put_i32_le(self.iar_num_hypotheses);
16623        __tmp.put_u16_le(self.wn);
16624        __tmp.put_u8(self.rtk_receiver_id);
16625        __tmp.put_u8(self.rtk_health);
16626        __tmp.put_u8(self.rtk_rate);
16627        __tmp.put_u8(self.nsats);
16628        __tmp.put_u8(self.baseline_coords_type as u8);
16629        if matches!(version, MavlinkVersion::V2) {
16630            let len = __tmp.len();
16631            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16632        } else {
16633            __tmp.len()
16634        }
16635    }
16636}
16637#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
16638#[doc = ""]
16639#[doc = "ID: 49"]
16640#[derive(Debug, Clone, PartialEq)]
16641#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16642#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16643#[cfg_attr(feature = "ts", derive(TS))]
16644#[cfg_attr(feature = "ts", ts(export))]
16645pub struct GPS_GLOBAL_ORIGIN_DATA {
16646    #[doc = "Latitude (WGS84)"]
16647    pub latitude: i32,
16648    #[doc = "Longitude (WGS84)"]
16649    pub longitude: i32,
16650    #[doc = "Altitude (MSL). Positive for up."]
16651    pub altitude: i32,
16652    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16653    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16654    pub time_usec: u64,
16655}
16656impl GPS_GLOBAL_ORIGIN_DATA {
16657    pub const ENCODED_LEN: usize = 20usize;
16658    pub const DEFAULT: Self = Self {
16659        latitude: 0_i32,
16660        longitude: 0_i32,
16661        altitude: 0_i32,
16662        time_usec: 0_u64,
16663    };
16664    #[cfg(feature = "arbitrary")]
16665    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16666        use arbitrary::{Arbitrary, Unstructured};
16667        let mut buf = [0u8; 1024];
16668        rng.fill_bytes(&mut buf);
16669        let mut unstructured = Unstructured::new(&buf);
16670        Self::arbitrary(&mut unstructured).unwrap_or_default()
16671    }
16672}
16673impl Default for GPS_GLOBAL_ORIGIN_DATA {
16674    fn default() -> Self {
16675        Self::DEFAULT.clone()
16676    }
16677}
16678impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
16679    type Message = MavMessage;
16680    const ID: u32 = 49u32;
16681    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
16682    const EXTRA_CRC: u8 = 39u8;
16683    const ENCODED_LEN: usize = 20usize;
16684    fn deser(
16685        _version: MavlinkVersion,
16686        __input: &[u8],
16687    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16688        let avail_len = __input.len();
16689        let mut payload_buf = [0; Self::ENCODED_LEN];
16690        let mut buf = if avail_len < Self::ENCODED_LEN {
16691            payload_buf[0..avail_len].copy_from_slice(__input);
16692            Bytes::new(&payload_buf)
16693        } else {
16694            Bytes::new(__input)
16695        };
16696        let mut __struct = Self::default();
16697        __struct.latitude = buf.get_i32_le()?;
16698        __struct.longitude = buf.get_i32_le()?;
16699        __struct.altitude = buf.get_i32_le()?;
16700        __struct.time_usec = buf.get_u64_le()?;
16701        Ok(__struct)
16702    }
16703    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16704        let mut __tmp = BytesMut::new(bytes);
16705        #[allow(clippy::absurd_extreme_comparisons)]
16706        #[allow(unused_comparisons)]
16707        if __tmp.remaining() < Self::ENCODED_LEN {
16708            panic!(
16709                "buffer is too small (need {} bytes, but got {})",
16710                Self::ENCODED_LEN,
16711                __tmp.remaining(),
16712            )
16713        }
16714        __tmp.put_i32_le(self.latitude);
16715        __tmp.put_i32_le(self.longitude);
16716        __tmp.put_i32_le(self.altitude);
16717        if matches!(version, MavlinkVersion::V2) {
16718            __tmp.put_u64_le(self.time_usec);
16719            let len = __tmp.len();
16720            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16721        } else {
16722            __tmp.len()
16723        }
16724    }
16725}
16726#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
16727#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
16728#[doc = ""]
16729#[doc = "ID: 123"]
16730#[derive(Debug, Clone, PartialEq)]
16731#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16732#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16733#[cfg_attr(feature = "ts", derive(TS))]
16734#[cfg_attr(feature = "ts", ts(export))]
16735pub struct GPS_INJECT_DATA_DATA {
16736    #[doc = "System ID"]
16737    pub target_system: u8,
16738    #[doc = "Component ID"]
16739    pub target_component: u8,
16740    #[doc = "Data length"]
16741    pub len: u8,
16742    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
16743    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16744    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16745    pub data: [u8; 110],
16746}
16747impl GPS_INJECT_DATA_DATA {
16748    pub const ENCODED_LEN: usize = 113usize;
16749    pub const DEFAULT: Self = Self {
16750        target_system: 0_u8,
16751        target_component: 0_u8,
16752        len: 0_u8,
16753        data: [0_u8; 110usize],
16754    };
16755    #[cfg(feature = "arbitrary")]
16756    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16757        use arbitrary::{Arbitrary, Unstructured};
16758        let mut buf = [0u8; 1024];
16759        rng.fill_bytes(&mut buf);
16760        let mut unstructured = Unstructured::new(&buf);
16761        Self::arbitrary(&mut unstructured).unwrap_or_default()
16762    }
16763}
16764impl Default for GPS_INJECT_DATA_DATA {
16765    fn default() -> Self {
16766        Self::DEFAULT.clone()
16767    }
16768}
16769impl MessageData for GPS_INJECT_DATA_DATA {
16770    type Message = MavMessage;
16771    const ID: u32 = 123u32;
16772    const NAME: &'static str = "GPS_INJECT_DATA";
16773    const EXTRA_CRC: u8 = 250u8;
16774    const ENCODED_LEN: usize = 113usize;
16775    fn deser(
16776        _version: MavlinkVersion,
16777        __input: &[u8],
16778    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16779        let avail_len = __input.len();
16780        let mut payload_buf = [0; Self::ENCODED_LEN];
16781        let mut buf = if avail_len < Self::ENCODED_LEN {
16782            payload_buf[0..avail_len].copy_from_slice(__input);
16783            Bytes::new(&payload_buf)
16784        } else {
16785            Bytes::new(__input)
16786        };
16787        let mut __struct = Self::default();
16788        __struct.target_system = buf.get_u8()?;
16789        __struct.target_component = buf.get_u8()?;
16790        __struct.len = buf.get_u8()?;
16791        for v in &mut __struct.data {
16792            let val = buf.get_u8()?;
16793            *v = val;
16794        }
16795        Ok(__struct)
16796    }
16797    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16798        let mut __tmp = BytesMut::new(bytes);
16799        #[allow(clippy::absurd_extreme_comparisons)]
16800        #[allow(unused_comparisons)]
16801        if __tmp.remaining() < Self::ENCODED_LEN {
16802            panic!(
16803                "buffer is too small (need {} bytes, but got {})",
16804                Self::ENCODED_LEN,
16805                __tmp.remaining(),
16806            )
16807        }
16808        __tmp.put_u8(self.target_system);
16809        __tmp.put_u8(self.target_component);
16810        __tmp.put_u8(self.len);
16811        for val in &self.data {
16812            __tmp.put_u8(*val);
16813        }
16814        if matches!(version, MavlinkVersion::V2) {
16815            let len = __tmp.len();
16816            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16817        } else {
16818            __tmp.len()
16819        }
16820    }
16821}
16822#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
16823#[doc = ""]
16824#[doc = "ID: 232"]
16825#[derive(Debug, Clone, PartialEq)]
16826#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16827#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16828#[cfg_attr(feature = "ts", derive(TS))]
16829#[cfg_attr(feature = "ts", ts(export))]
16830pub struct GPS_INPUT_DATA {
16831    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16832    pub time_usec: u64,
16833    #[doc = "GPS time (from start of GPS week)"]
16834    pub time_week_ms: u32,
16835    #[doc = "Latitude (WGS84)"]
16836    pub lat: i32,
16837    #[doc = "Longitude (WGS84)"]
16838    pub lon: i32,
16839    #[doc = "Altitude (MSL). Positive for up."]
16840    pub alt: f32,
16841    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
16842    pub hdop: f32,
16843    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
16844    pub vdop: f32,
16845    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
16846    pub vn: f32,
16847    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
16848    pub ve: f32,
16849    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
16850    pub vd: f32,
16851    #[doc = "GPS speed accuracy"]
16852    pub speed_accuracy: f32,
16853    #[doc = "GPS horizontal accuracy"]
16854    pub horiz_accuracy: f32,
16855    #[doc = "GPS vertical accuracy"]
16856    pub vert_accuracy: f32,
16857    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
16858    pub ignore_flags: GpsInputIgnoreFlags,
16859    #[doc = "GPS week number"]
16860    pub time_week: u16,
16861    #[doc = "ID of the GPS for multiple GPS inputs"]
16862    pub gps_id: u8,
16863    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
16864    pub fix_type: u8,
16865    #[doc = "Number of satellites visible."]
16866    pub satellites_visible: u8,
16867    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
16868    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16869    pub yaw: u16,
16870}
16871impl GPS_INPUT_DATA {
16872    pub const ENCODED_LEN: usize = 65usize;
16873    pub const DEFAULT: Self = Self {
16874        time_usec: 0_u64,
16875        time_week_ms: 0_u32,
16876        lat: 0_i32,
16877        lon: 0_i32,
16878        alt: 0.0_f32,
16879        hdop: 0.0_f32,
16880        vdop: 0.0_f32,
16881        vn: 0.0_f32,
16882        ve: 0.0_f32,
16883        vd: 0.0_f32,
16884        speed_accuracy: 0.0_f32,
16885        horiz_accuracy: 0.0_f32,
16886        vert_accuracy: 0.0_f32,
16887        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
16888        time_week: 0_u16,
16889        gps_id: 0_u8,
16890        fix_type: 0_u8,
16891        satellites_visible: 0_u8,
16892        yaw: 0_u16,
16893    };
16894    #[cfg(feature = "arbitrary")]
16895    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16896        use arbitrary::{Arbitrary, Unstructured};
16897        let mut buf = [0u8; 1024];
16898        rng.fill_bytes(&mut buf);
16899        let mut unstructured = Unstructured::new(&buf);
16900        Self::arbitrary(&mut unstructured).unwrap_or_default()
16901    }
16902}
16903impl Default for GPS_INPUT_DATA {
16904    fn default() -> Self {
16905        Self::DEFAULT.clone()
16906    }
16907}
16908impl MessageData for GPS_INPUT_DATA {
16909    type Message = MavMessage;
16910    const ID: u32 = 232u32;
16911    const NAME: &'static str = "GPS_INPUT";
16912    const EXTRA_CRC: u8 = 151u8;
16913    const ENCODED_LEN: usize = 65usize;
16914    fn deser(
16915        _version: MavlinkVersion,
16916        __input: &[u8],
16917    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16918        let avail_len = __input.len();
16919        let mut payload_buf = [0; Self::ENCODED_LEN];
16920        let mut buf = if avail_len < Self::ENCODED_LEN {
16921            payload_buf[0..avail_len].copy_from_slice(__input);
16922            Bytes::new(&payload_buf)
16923        } else {
16924            Bytes::new(__input)
16925        };
16926        let mut __struct = Self::default();
16927        __struct.time_usec = buf.get_u64_le()?;
16928        __struct.time_week_ms = buf.get_u32_le()?;
16929        __struct.lat = buf.get_i32_le()?;
16930        __struct.lon = buf.get_i32_le()?;
16931        __struct.alt = buf.get_f32_le()?;
16932        __struct.hdop = buf.get_f32_le()?;
16933        __struct.vdop = buf.get_f32_le()?;
16934        __struct.vn = buf.get_f32_le()?;
16935        __struct.ve = buf.get_f32_le()?;
16936        __struct.vd = buf.get_f32_le()?;
16937        __struct.speed_accuracy = buf.get_f32_le()?;
16938        __struct.horiz_accuracy = buf.get_f32_le()?;
16939        __struct.vert_accuracy = buf.get_f32_le()?;
16940        let tmp = buf.get_u16_le()?;
16941        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
16942            tmp as <GpsInputIgnoreFlags as Flags>::Bits,
16943        )
16944        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16945            flag_type: "GpsInputIgnoreFlags",
16946            value: tmp as u64,
16947        })?;
16948        __struct.time_week = buf.get_u16_le()?;
16949        __struct.gps_id = buf.get_u8()?;
16950        __struct.fix_type = buf.get_u8()?;
16951        __struct.satellites_visible = buf.get_u8()?;
16952        __struct.yaw = buf.get_u16_le()?;
16953        Ok(__struct)
16954    }
16955    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16956        let mut __tmp = BytesMut::new(bytes);
16957        #[allow(clippy::absurd_extreme_comparisons)]
16958        #[allow(unused_comparisons)]
16959        if __tmp.remaining() < Self::ENCODED_LEN {
16960            panic!(
16961                "buffer is too small (need {} bytes, but got {})",
16962                Self::ENCODED_LEN,
16963                __tmp.remaining(),
16964            )
16965        }
16966        __tmp.put_u64_le(self.time_usec);
16967        __tmp.put_u32_le(self.time_week_ms);
16968        __tmp.put_i32_le(self.lat);
16969        __tmp.put_i32_le(self.lon);
16970        __tmp.put_f32_le(self.alt);
16971        __tmp.put_f32_le(self.hdop);
16972        __tmp.put_f32_le(self.vdop);
16973        __tmp.put_f32_le(self.vn);
16974        __tmp.put_f32_le(self.ve);
16975        __tmp.put_f32_le(self.vd);
16976        __tmp.put_f32_le(self.speed_accuracy);
16977        __tmp.put_f32_le(self.horiz_accuracy);
16978        __tmp.put_f32_le(self.vert_accuracy);
16979        __tmp.put_u16_le(self.ignore_flags.bits() as u16);
16980        __tmp.put_u16_le(self.time_week);
16981        __tmp.put_u8(self.gps_id);
16982        __tmp.put_u8(self.fix_type);
16983        __tmp.put_u8(self.satellites_visible);
16984        if matches!(version, MavlinkVersion::V2) {
16985            __tmp.put_u16_le(self.yaw);
16986            let len = __tmp.len();
16987            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16988        } else {
16989            __tmp.len()
16990        }
16991    }
16992}
16993#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
16994#[doc = ""]
16995#[doc = "ID: 24"]
16996#[derive(Debug, Clone, PartialEq)]
16997#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16998#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16999#[cfg_attr(feature = "ts", derive(TS))]
17000#[cfg_attr(feature = "ts", ts(export))]
17001pub struct GPS_RAW_INT_DATA {
17002    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17003    pub time_usec: u64,
17004    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
17005    pub lat: i32,
17006    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
17007    pub lon: i32,
17008    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
17009    pub alt: i32,
17010    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
17011    pub eph: u16,
17012    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
17013    pub epv: u16,
17014    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
17015    pub vel: u16,
17016    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
17017    pub cog: u16,
17018    #[doc = "GPS fix type."]
17019    pub fix_type: GpsFixType,
17020    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
17021    pub satellites_visible: u8,
17022    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
17023    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17024    pub alt_ellipsoid: i32,
17025    #[doc = "Position uncertainty."]
17026    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17027    pub h_acc: u32,
17028    #[doc = "Altitude uncertainty."]
17029    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17030    pub v_acc: u32,
17031    #[doc = "Speed uncertainty."]
17032    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17033    pub vel_acc: u32,
17034    #[doc = "Heading / track uncertainty"]
17035    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17036    pub hdg_acc: u32,
17037    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
17038    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17039    pub yaw: u16,
17040}
17041impl GPS_RAW_INT_DATA {
17042    pub const ENCODED_LEN: usize = 52usize;
17043    pub const DEFAULT: Self = Self {
17044        time_usec: 0_u64,
17045        lat: 0_i32,
17046        lon: 0_i32,
17047        alt: 0_i32,
17048        eph: 0_u16,
17049        epv: 0_u16,
17050        vel: 0_u16,
17051        cog: 0_u16,
17052        fix_type: GpsFixType::DEFAULT,
17053        satellites_visible: 0_u8,
17054        alt_ellipsoid: 0_i32,
17055        h_acc: 0_u32,
17056        v_acc: 0_u32,
17057        vel_acc: 0_u32,
17058        hdg_acc: 0_u32,
17059        yaw: 0_u16,
17060    };
17061    #[cfg(feature = "arbitrary")]
17062    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17063        use arbitrary::{Arbitrary, Unstructured};
17064        let mut buf = [0u8; 1024];
17065        rng.fill_bytes(&mut buf);
17066        let mut unstructured = Unstructured::new(&buf);
17067        Self::arbitrary(&mut unstructured).unwrap_or_default()
17068    }
17069}
17070impl Default for GPS_RAW_INT_DATA {
17071    fn default() -> Self {
17072        Self::DEFAULT.clone()
17073    }
17074}
17075impl MessageData for GPS_RAW_INT_DATA {
17076    type Message = MavMessage;
17077    const ID: u32 = 24u32;
17078    const NAME: &'static str = "GPS_RAW_INT";
17079    const EXTRA_CRC: u8 = 24u8;
17080    const ENCODED_LEN: usize = 52usize;
17081    fn deser(
17082        _version: MavlinkVersion,
17083        __input: &[u8],
17084    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17085        let avail_len = __input.len();
17086        let mut payload_buf = [0; Self::ENCODED_LEN];
17087        let mut buf = if avail_len < Self::ENCODED_LEN {
17088            payload_buf[0..avail_len].copy_from_slice(__input);
17089            Bytes::new(&payload_buf)
17090        } else {
17091            Bytes::new(__input)
17092        };
17093        let mut __struct = Self::default();
17094        __struct.time_usec = buf.get_u64_le()?;
17095        __struct.lat = buf.get_i32_le()?;
17096        __struct.lon = buf.get_i32_le()?;
17097        __struct.alt = buf.get_i32_le()?;
17098        __struct.eph = buf.get_u16_le()?;
17099        __struct.epv = buf.get_u16_le()?;
17100        __struct.vel = buf.get_u16_le()?;
17101        __struct.cog = buf.get_u16_le()?;
17102        let tmp = buf.get_u8()?;
17103        __struct.fix_type =
17104            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17105                enum_type: "GpsFixType",
17106                value: tmp as u64,
17107            })?;
17108        __struct.satellites_visible = buf.get_u8()?;
17109        __struct.alt_ellipsoid = buf.get_i32_le()?;
17110        __struct.h_acc = buf.get_u32_le()?;
17111        __struct.v_acc = buf.get_u32_le()?;
17112        __struct.vel_acc = buf.get_u32_le()?;
17113        __struct.hdg_acc = buf.get_u32_le()?;
17114        __struct.yaw = buf.get_u16_le()?;
17115        Ok(__struct)
17116    }
17117    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17118        let mut __tmp = BytesMut::new(bytes);
17119        #[allow(clippy::absurd_extreme_comparisons)]
17120        #[allow(unused_comparisons)]
17121        if __tmp.remaining() < Self::ENCODED_LEN {
17122            panic!(
17123                "buffer is too small (need {} bytes, but got {})",
17124                Self::ENCODED_LEN,
17125                __tmp.remaining(),
17126            )
17127        }
17128        __tmp.put_u64_le(self.time_usec);
17129        __tmp.put_i32_le(self.lat);
17130        __tmp.put_i32_le(self.lon);
17131        __tmp.put_i32_le(self.alt);
17132        __tmp.put_u16_le(self.eph);
17133        __tmp.put_u16_le(self.epv);
17134        __tmp.put_u16_le(self.vel);
17135        __tmp.put_u16_le(self.cog);
17136        __tmp.put_u8(self.fix_type as u8);
17137        __tmp.put_u8(self.satellites_visible);
17138        if matches!(version, MavlinkVersion::V2) {
17139            __tmp.put_i32_le(self.alt_ellipsoid);
17140            __tmp.put_u32_le(self.h_acc);
17141            __tmp.put_u32_le(self.v_acc);
17142            __tmp.put_u32_le(self.vel_acc);
17143            __tmp.put_u32_le(self.hdg_acc);
17144            __tmp.put_u16_le(self.yaw);
17145            let len = __tmp.len();
17146            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17147        } else {
17148            __tmp.len()
17149        }
17150    }
17151}
17152#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
17153#[doc = ""]
17154#[doc = "ID: 233"]
17155#[derive(Debug, Clone, PartialEq)]
17156#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17157#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17158#[cfg_attr(feature = "ts", derive(TS))]
17159#[cfg_attr(feature = "ts", ts(export))]
17160pub struct GPS_RTCM_DATA_DATA {
17161    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
17162    pub flags: u8,
17163    #[doc = "data length"]
17164    pub len: u8,
17165    #[doc = "RTCM message (may be fragmented)"]
17166    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17167    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17168    pub data: [u8; 180],
17169}
17170impl GPS_RTCM_DATA_DATA {
17171    pub const ENCODED_LEN: usize = 182usize;
17172    pub const DEFAULT: Self = Self {
17173        flags: 0_u8,
17174        len: 0_u8,
17175        data: [0_u8; 180usize],
17176    };
17177    #[cfg(feature = "arbitrary")]
17178    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17179        use arbitrary::{Arbitrary, Unstructured};
17180        let mut buf = [0u8; 1024];
17181        rng.fill_bytes(&mut buf);
17182        let mut unstructured = Unstructured::new(&buf);
17183        Self::arbitrary(&mut unstructured).unwrap_or_default()
17184    }
17185}
17186impl Default for GPS_RTCM_DATA_DATA {
17187    fn default() -> Self {
17188        Self::DEFAULT.clone()
17189    }
17190}
17191impl MessageData for GPS_RTCM_DATA_DATA {
17192    type Message = MavMessage;
17193    const ID: u32 = 233u32;
17194    const NAME: &'static str = "GPS_RTCM_DATA";
17195    const EXTRA_CRC: u8 = 35u8;
17196    const ENCODED_LEN: usize = 182usize;
17197    fn deser(
17198        _version: MavlinkVersion,
17199        __input: &[u8],
17200    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17201        let avail_len = __input.len();
17202        let mut payload_buf = [0; Self::ENCODED_LEN];
17203        let mut buf = if avail_len < Self::ENCODED_LEN {
17204            payload_buf[0..avail_len].copy_from_slice(__input);
17205            Bytes::new(&payload_buf)
17206        } else {
17207            Bytes::new(__input)
17208        };
17209        let mut __struct = Self::default();
17210        __struct.flags = buf.get_u8()?;
17211        __struct.len = buf.get_u8()?;
17212        for v in &mut __struct.data {
17213            let val = buf.get_u8()?;
17214            *v = val;
17215        }
17216        Ok(__struct)
17217    }
17218    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17219        let mut __tmp = BytesMut::new(bytes);
17220        #[allow(clippy::absurd_extreme_comparisons)]
17221        #[allow(unused_comparisons)]
17222        if __tmp.remaining() < Self::ENCODED_LEN {
17223            panic!(
17224                "buffer is too small (need {} bytes, but got {})",
17225                Self::ENCODED_LEN,
17226                __tmp.remaining(),
17227            )
17228        }
17229        __tmp.put_u8(self.flags);
17230        __tmp.put_u8(self.len);
17231        for val in &self.data {
17232            __tmp.put_u8(*val);
17233        }
17234        if matches!(version, MavlinkVersion::V2) {
17235            let len = __tmp.len();
17236            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17237        } else {
17238            __tmp.len()
17239        }
17240    }
17241}
17242#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
17243#[doc = ""]
17244#[doc = "ID: 127"]
17245#[derive(Debug, Clone, PartialEq)]
17246#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17247#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17248#[cfg_attr(feature = "ts", derive(TS))]
17249#[cfg_attr(feature = "ts", ts(export))]
17250pub struct GPS_RTK_DATA {
17251    #[doc = "Time since boot of last baseline message received."]
17252    pub time_last_baseline_ms: u32,
17253    #[doc = "GPS Time of Week of last baseline"]
17254    pub tow: u32,
17255    #[doc = "Current baseline in ECEF x or NED north component."]
17256    pub baseline_a_mm: i32,
17257    #[doc = "Current baseline in ECEF y or NED east component."]
17258    pub baseline_b_mm: i32,
17259    #[doc = "Current baseline in ECEF z or NED down component."]
17260    pub baseline_c_mm: i32,
17261    #[doc = "Current estimate of baseline accuracy."]
17262    pub accuracy: u32,
17263    #[doc = "Current number of integer ambiguity hypotheses."]
17264    pub iar_num_hypotheses: i32,
17265    #[doc = "GPS Week Number of last baseline"]
17266    pub wn: u16,
17267    #[doc = "Identification of connected RTK receiver."]
17268    pub rtk_receiver_id: u8,
17269    #[doc = "GPS-specific health report for RTK data."]
17270    pub rtk_health: u8,
17271    #[doc = "Rate of baseline messages being received by GPS"]
17272    pub rtk_rate: u8,
17273    #[doc = "Current number of sats used for RTK calculation."]
17274    pub nsats: u8,
17275    #[doc = "Coordinate system of baseline"]
17276    pub baseline_coords_type: RtkBaselineCoordinateSystem,
17277}
17278impl GPS_RTK_DATA {
17279    pub const ENCODED_LEN: usize = 35usize;
17280    pub const DEFAULT: Self = Self {
17281        time_last_baseline_ms: 0_u32,
17282        tow: 0_u32,
17283        baseline_a_mm: 0_i32,
17284        baseline_b_mm: 0_i32,
17285        baseline_c_mm: 0_i32,
17286        accuracy: 0_u32,
17287        iar_num_hypotheses: 0_i32,
17288        wn: 0_u16,
17289        rtk_receiver_id: 0_u8,
17290        rtk_health: 0_u8,
17291        rtk_rate: 0_u8,
17292        nsats: 0_u8,
17293        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
17294    };
17295    #[cfg(feature = "arbitrary")]
17296    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17297        use arbitrary::{Arbitrary, Unstructured};
17298        let mut buf = [0u8; 1024];
17299        rng.fill_bytes(&mut buf);
17300        let mut unstructured = Unstructured::new(&buf);
17301        Self::arbitrary(&mut unstructured).unwrap_or_default()
17302    }
17303}
17304impl Default for GPS_RTK_DATA {
17305    fn default() -> Self {
17306        Self::DEFAULT.clone()
17307    }
17308}
17309impl MessageData for GPS_RTK_DATA {
17310    type Message = MavMessage;
17311    const ID: u32 = 127u32;
17312    const NAME: &'static str = "GPS_RTK";
17313    const EXTRA_CRC: u8 = 25u8;
17314    const ENCODED_LEN: usize = 35usize;
17315    fn deser(
17316        _version: MavlinkVersion,
17317        __input: &[u8],
17318    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17319        let avail_len = __input.len();
17320        let mut payload_buf = [0; Self::ENCODED_LEN];
17321        let mut buf = if avail_len < Self::ENCODED_LEN {
17322            payload_buf[0..avail_len].copy_from_slice(__input);
17323            Bytes::new(&payload_buf)
17324        } else {
17325            Bytes::new(__input)
17326        };
17327        let mut __struct = Self::default();
17328        __struct.time_last_baseline_ms = buf.get_u32_le()?;
17329        __struct.tow = buf.get_u32_le()?;
17330        __struct.baseline_a_mm = buf.get_i32_le()?;
17331        __struct.baseline_b_mm = buf.get_i32_le()?;
17332        __struct.baseline_c_mm = buf.get_i32_le()?;
17333        __struct.accuracy = buf.get_u32_le()?;
17334        __struct.iar_num_hypotheses = buf.get_i32_le()?;
17335        __struct.wn = buf.get_u16_le()?;
17336        __struct.rtk_receiver_id = buf.get_u8()?;
17337        __struct.rtk_health = buf.get_u8()?;
17338        __struct.rtk_rate = buf.get_u8()?;
17339        __struct.nsats = buf.get_u8()?;
17340        let tmp = buf.get_u8()?;
17341        __struct.baseline_coords_type =
17342            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17343                enum_type: "RtkBaselineCoordinateSystem",
17344                value: tmp as u64,
17345            })?;
17346        Ok(__struct)
17347    }
17348    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17349        let mut __tmp = BytesMut::new(bytes);
17350        #[allow(clippy::absurd_extreme_comparisons)]
17351        #[allow(unused_comparisons)]
17352        if __tmp.remaining() < Self::ENCODED_LEN {
17353            panic!(
17354                "buffer is too small (need {} bytes, but got {})",
17355                Self::ENCODED_LEN,
17356                __tmp.remaining(),
17357            )
17358        }
17359        __tmp.put_u32_le(self.time_last_baseline_ms);
17360        __tmp.put_u32_le(self.tow);
17361        __tmp.put_i32_le(self.baseline_a_mm);
17362        __tmp.put_i32_le(self.baseline_b_mm);
17363        __tmp.put_i32_le(self.baseline_c_mm);
17364        __tmp.put_u32_le(self.accuracy);
17365        __tmp.put_i32_le(self.iar_num_hypotheses);
17366        __tmp.put_u16_le(self.wn);
17367        __tmp.put_u8(self.rtk_receiver_id);
17368        __tmp.put_u8(self.rtk_health);
17369        __tmp.put_u8(self.rtk_rate);
17370        __tmp.put_u8(self.nsats);
17371        __tmp.put_u8(self.baseline_coords_type as u8);
17372        if matches!(version, MavlinkVersion::V2) {
17373            let len = __tmp.len();
17374            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17375        } else {
17376            __tmp.len()
17377        }
17378    }
17379}
17380#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
17381#[doc = ""]
17382#[doc = "ID: 25"]
17383#[derive(Debug, Clone, PartialEq)]
17384#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17385#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17386#[cfg_attr(feature = "ts", derive(TS))]
17387#[cfg_attr(feature = "ts", ts(export))]
17388pub struct GPS_STATUS_DATA {
17389    #[doc = "Number of satellites visible"]
17390    pub satellites_visible: u8,
17391    #[doc = "Global satellite ID"]
17392    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17393    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17394    pub satellite_prn: [u8; 20],
17395    #[doc = "0: Satellite not used, 1: used for localization"]
17396    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17397    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17398    pub satellite_used: [u8; 20],
17399    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
17400    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17401    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17402    pub satellite_elevation: [u8; 20],
17403    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
17404    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17405    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17406    pub satellite_azimuth: [u8; 20],
17407    #[doc = "Signal to noise ratio of satellite"]
17408    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17409    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17410    pub satellite_snr: [u8; 20],
17411}
17412impl GPS_STATUS_DATA {
17413    pub const ENCODED_LEN: usize = 101usize;
17414    pub const DEFAULT: Self = Self {
17415        satellites_visible: 0_u8,
17416        satellite_prn: [0_u8; 20usize],
17417        satellite_used: [0_u8; 20usize],
17418        satellite_elevation: [0_u8; 20usize],
17419        satellite_azimuth: [0_u8; 20usize],
17420        satellite_snr: [0_u8; 20usize],
17421    };
17422    #[cfg(feature = "arbitrary")]
17423    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17424        use arbitrary::{Arbitrary, Unstructured};
17425        let mut buf = [0u8; 1024];
17426        rng.fill_bytes(&mut buf);
17427        let mut unstructured = Unstructured::new(&buf);
17428        Self::arbitrary(&mut unstructured).unwrap_or_default()
17429    }
17430}
17431impl Default for GPS_STATUS_DATA {
17432    fn default() -> Self {
17433        Self::DEFAULT.clone()
17434    }
17435}
17436impl MessageData for GPS_STATUS_DATA {
17437    type Message = MavMessage;
17438    const ID: u32 = 25u32;
17439    const NAME: &'static str = "GPS_STATUS";
17440    const EXTRA_CRC: u8 = 23u8;
17441    const ENCODED_LEN: usize = 101usize;
17442    fn deser(
17443        _version: MavlinkVersion,
17444        __input: &[u8],
17445    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17446        let avail_len = __input.len();
17447        let mut payload_buf = [0; Self::ENCODED_LEN];
17448        let mut buf = if avail_len < Self::ENCODED_LEN {
17449            payload_buf[0..avail_len].copy_from_slice(__input);
17450            Bytes::new(&payload_buf)
17451        } else {
17452            Bytes::new(__input)
17453        };
17454        let mut __struct = Self::default();
17455        __struct.satellites_visible = buf.get_u8()?;
17456        for v in &mut __struct.satellite_prn {
17457            let val = buf.get_u8()?;
17458            *v = val;
17459        }
17460        for v in &mut __struct.satellite_used {
17461            let val = buf.get_u8()?;
17462            *v = val;
17463        }
17464        for v in &mut __struct.satellite_elevation {
17465            let val = buf.get_u8()?;
17466            *v = val;
17467        }
17468        for v in &mut __struct.satellite_azimuth {
17469            let val = buf.get_u8()?;
17470            *v = val;
17471        }
17472        for v in &mut __struct.satellite_snr {
17473            let val = buf.get_u8()?;
17474            *v = val;
17475        }
17476        Ok(__struct)
17477    }
17478    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17479        let mut __tmp = BytesMut::new(bytes);
17480        #[allow(clippy::absurd_extreme_comparisons)]
17481        #[allow(unused_comparisons)]
17482        if __tmp.remaining() < Self::ENCODED_LEN {
17483            panic!(
17484                "buffer is too small (need {} bytes, but got {})",
17485                Self::ENCODED_LEN,
17486                __tmp.remaining(),
17487            )
17488        }
17489        __tmp.put_u8(self.satellites_visible);
17490        for val in &self.satellite_prn {
17491            __tmp.put_u8(*val);
17492        }
17493        for val in &self.satellite_used {
17494            __tmp.put_u8(*val);
17495        }
17496        for val in &self.satellite_elevation {
17497            __tmp.put_u8(*val);
17498        }
17499        for val in &self.satellite_azimuth {
17500            __tmp.put_u8(*val);
17501        }
17502        for val in &self.satellite_snr {
17503            __tmp.put_u8(*val);
17504        }
17505        if matches!(version, MavlinkVersion::V2) {
17506            let len = __tmp.len();
17507            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17508        } else {
17509            __tmp.len()
17510        }
17511    }
17512}
17513#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
17514#[doc = ""]
17515#[doc = "ID: 0"]
17516#[derive(Debug, Clone, PartialEq)]
17517#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17518#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17519#[cfg_attr(feature = "ts", derive(TS))]
17520#[cfg_attr(feature = "ts", ts(export))]
17521pub struct HEARTBEAT_DATA {
17522    #[doc = "A bitfield for use for autopilot-specific flags"]
17523    pub custom_mode: u32,
17524    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
17525    pub mavtype: MavType,
17526    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
17527    pub autopilot: MavAutopilot,
17528    #[doc = "System mode bitmap."]
17529    pub base_mode: MavModeFlag,
17530    #[doc = "System status flag."]
17531    pub system_status: MavState,
17532    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
17533    pub mavlink_version: u8,
17534}
17535impl HEARTBEAT_DATA {
17536    pub const ENCODED_LEN: usize = 9usize;
17537    pub const DEFAULT: Self = Self {
17538        custom_mode: 0_u32,
17539        mavtype: MavType::DEFAULT,
17540        autopilot: MavAutopilot::DEFAULT,
17541        base_mode: MavModeFlag::DEFAULT,
17542        system_status: MavState::DEFAULT,
17543        mavlink_version: MINOR_MAVLINK_VERSION,
17544    };
17545    #[cfg(feature = "arbitrary")]
17546    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17547        use arbitrary::{Arbitrary, Unstructured};
17548        let mut buf = [0u8; 1024];
17549        rng.fill_bytes(&mut buf);
17550        let mut unstructured = Unstructured::new(&buf);
17551        Self::arbitrary(&mut unstructured).unwrap_or_default()
17552    }
17553}
17554impl Default for HEARTBEAT_DATA {
17555    fn default() -> Self {
17556        Self::DEFAULT.clone()
17557    }
17558}
17559impl MessageData for HEARTBEAT_DATA {
17560    type Message = MavMessage;
17561    const ID: u32 = 0u32;
17562    const NAME: &'static str = "HEARTBEAT";
17563    const EXTRA_CRC: u8 = 50u8;
17564    const ENCODED_LEN: usize = 9usize;
17565    fn deser(
17566        _version: MavlinkVersion,
17567        __input: &[u8],
17568    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17569        let avail_len = __input.len();
17570        let mut payload_buf = [0; Self::ENCODED_LEN];
17571        let mut buf = if avail_len < Self::ENCODED_LEN {
17572            payload_buf[0..avail_len].copy_from_slice(__input);
17573            Bytes::new(&payload_buf)
17574        } else {
17575            Bytes::new(__input)
17576        };
17577        let mut __struct = Self::default();
17578        __struct.custom_mode = buf.get_u32_le()?;
17579        let tmp = buf.get_u8()?;
17580        __struct.mavtype =
17581            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17582                enum_type: "MavType",
17583                value: tmp as u64,
17584            })?;
17585        let tmp = buf.get_u8()?;
17586        __struct.autopilot =
17587            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17588                enum_type: "MavAutopilot",
17589                value: tmp as u64,
17590            })?;
17591        let tmp = buf.get_u8()?;
17592        __struct.base_mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
17593            ::mavlink_core::error::ParserError::InvalidFlag {
17594                flag_type: "MavModeFlag",
17595                value: tmp as u64,
17596            },
17597        )?;
17598        let tmp = buf.get_u8()?;
17599        __struct.system_status =
17600            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17601                enum_type: "MavState",
17602                value: tmp as u64,
17603            })?;
17604        __struct.mavlink_version = buf.get_u8()?;
17605        Ok(__struct)
17606    }
17607    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17608        let mut __tmp = BytesMut::new(bytes);
17609        #[allow(clippy::absurd_extreme_comparisons)]
17610        #[allow(unused_comparisons)]
17611        if __tmp.remaining() < Self::ENCODED_LEN {
17612            panic!(
17613                "buffer is too small (need {} bytes, but got {})",
17614                Self::ENCODED_LEN,
17615                __tmp.remaining(),
17616            )
17617        }
17618        __tmp.put_u32_le(self.custom_mode);
17619        __tmp.put_u8(self.mavtype as u8);
17620        __tmp.put_u8(self.autopilot as u8);
17621        __tmp.put_u8(self.base_mode.bits() as u8);
17622        __tmp.put_u8(self.system_status as u8);
17623        __tmp.put_u8(self.mavlink_version);
17624        if matches!(version, MavlinkVersion::V2) {
17625            let len = __tmp.len();
17626            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17627        } else {
17628            __tmp.len()
17629        }
17630    }
17631}
17632#[doc = "The IMU readings in SI units in NED body frame."]
17633#[doc = ""]
17634#[doc = "ID: 105"]
17635#[derive(Debug, Clone, PartialEq)]
17636#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17637#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17638#[cfg_attr(feature = "ts", derive(TS))]
17639#[cfg_attr(feature = "ts", ts(export))]
17640pub struct HIGHRES_IMU_DATA {
17641    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17642    pub time_usec: u64,
17643    #[doc = "X acceleration"]
17644    pub xacc: f32,
17645    #[doc = "Y acceleration"]
17646    pub yacc: f32,
17647    #[doc = "Z acceleration"]
17648    pub zacc: f32,
17649    #[doc = "Angular speed around X axis"]
17650    pub xgyro: f32,
17651    #[doc = "Angular speed around Y axis"]
17652    pub ygyro: f32,
17653    #[doc = "Angular speed around Z axis"]
17654    pub zgyro: f32,
17655    #[doc = "X Magnetic field"]
17656    pub xmag: f32,
17657    #[doc = "Y Magnetic field"]
17658    pub ymag: f32,
17659    #[doc = "Z Magnetic field"]
17660    pub zmag: f32,
17661    #[doc = "Absolute pressure"]
17662    pub abs_pressure: f32,
17663    #[doc = "Differential pressure"]
17664    pub diff_pressure: f32,
17665    #[doc = "Altitude calculated from pressure"]
17666    pub pressure_alt: f32,
17667    #[doc = "Temperature"]
17668    pub temperature: f32,
17669    #[doc = "Bitmap for fields that have updated since last message"]
17670    pub fields_updated: HighresImuUpdatedFlags,
17671    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
17672    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17673    pub id: u8,
17674}
17675impl HIGHRES_IMU_DATA {
17676    pub const ENCODED_LEN: usize = 63usize;
17677    pub const DEFAULT: Self = Self {
17678        time_usec: 0_u64,
17679        xacc: 0.0_f32,
17680        yacc: 0.0_f32,
17681        zacc: 0.0_f32,
17682        xgyro: 0.0_f32,
17683        ygyro: 0.0_f32,
17684        zgyro: 0.0_f32,
17685        xmag: 0.0_f32,
17686        ymag: 0.0_f32,
17687        zmag: 0.0_f32,
17688        abs_pressure: 0.0_f32,
17689        diff_pressure: 0.0_f32,
17690        pressure_alt: 0.0_f32,
17691        temperature: 0.0_f32,
17692        fields_updated: HighresImuUpdatedFlags::DEFAULT,
17693        id: 0_u8,
17694    };
17695    #[cfg(feature = "arbitrary")]
17696    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17697        use arbitrary::{Arbitrary, Unstructured};
17698        let mut buf = [0u8; 1024];
17699        rng.fill_bytes(&mut buf);
17700        let mut unstructured = Unstructured::new(&buf);
17701        Self::arbitrary(&mut unstructured).unwrap_or_default()
17702    }
17703}
17704impl Default for HIGHRES_IMU_DATA {
17705    fn default() -> Self {
17706        Self::DEFAULT.clone()
17707    }
17708}
17709impl MessageData for HIGHRES_IMU_DATA {
17710    type Message = MavMessage;
17711    const ID: u32 = 105u32;
17712    const NAME: &'static str = "HIGHRES_IMU";
17713    const EXTRA_CRC: u8 = 93u8;
17714    const ENCODED_LEN: usize = 63usize;
17715    fn deser(
17716        _version: MavlinkVersion,
17717        __input: &[u8],
17718    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17719        let avail_len = __input.len();
17720        let mut payload_buf = [0; Self::ENCODED_LEN];
17721        let mut buf = if avail_len < Self::ENCODED_LEN {
17722            payload_buf[0..avail_len].copy_from_slice(__input);
17723            Bytes::new(&payload_buf)
17724        } else {
17725            Bytes::new(__input)
17726        };
17727        let mut __struct = Self::default();
17728        __struct.time_usec = buf.get_u64_le()?;
17729        __struct.xacc = buf.get_f32_le()?;
17730        __struct.yacc = buf.get_f32_le()?;
17731        __struct.zacc = buf.get_f32_le()?;
17732        __struct.xgyro = buf.get_f32_le()?;
17733        __struct.ygyro = buf.get_f32_le()?;
17734        __struct.zgyro = buf.get_f32_le()?;
17735        __struct.xmag = buf.get_f32_le()?;
17736        __struct.ymag = buf.get_f32_le()?;
17737        __struct.zmag = buf.get_f32_le()?;
17738        __struct.abs_pressure = buf.get_f32_le()?;
17739        __struct.diff_pressure = buf.get_f32_le()?;
17740        __struct.pressure_alt = buf.get_f32_le()?;
17741        __struct.temperature = buf.get_f32_le()?;
17742        let tmp = buf.get_u16_le()?;
17743        __struct.fields_updated =
17744            HighresImuUpdatedFlags::from_bits(tmp as <HighresImuUpdatedFlags as Flags>::Bits)
17745                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
17746                    flag_type: "HighresImuUpdatedFlags",
17747                    value: tmp as u64,
17748                })?;
17749        __struct.id = buf.get_u8()?;
17750        Ok(__struct)
17751    }
17752    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17753        let mut __tmp = BytesMut::new(bytes);
17754        #[allow(clippy::absurd_extreme_comparisons)]
17755        #[allow(unused_comparisons)]
17756        if __tmp.remaining() < Self::ENCODED_LEN {
17757            panic!(
17758                "buffer is too small (need {} bytes, but got {})",
17759                Self::ENCODED_LEN,
17760                __tmp.remaining(),
17761            )
17762        }
17763        __tmp.put_u64_le(self.time_usec);
17764        __tmp.put_f32_le(self.xacc);
17765        __tmp.put_f32_le(self.yacc);
17766        __tmp.put_f32_le(self.zacc);
17767        __tmp.put_f32_le(self.xgyro);
17768        __tmp.put_f32_le(self.ygyro);
17769        __tmp.put_f32_le(self.zgyro);
17770        __tmp.put_f32_le(self.xmag);
17771        __tmp.put_f32_le(self.ymag);
17772        __tmp.put_f32_le(self.zmag);
17773        __tmp.put_f32_le(self.abs_pressure);
17774        __tmp.put_f32_le(self.diff_pressure);
17775        __tmp.put_f32_le(self.pressure_alt);
17776        __tmp.put_f32_le(self.temperature);
17777        __tmp.put_u16_le(self.fields_updated.bits() as u16);
17778        if matches!(version, MavlinkVersion::V2) {
17779            __tmp.put_u8(self.id);
17780            let len = __tmp.len();
17781            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17782        } else {
17783            __tmp.len()
17784        }
17785    }
17786}
17787#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
17788#[doc = "Message appropriate for high latency connections like Iridium."]
17789#[doc = ""]
17790#[doc = "ID: 234"]
17791#[derive(Debug, Clone, PartialEq)]
17792#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17793#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17794#[cfg_attr(feature = "ts", derive(TS))]
17795#[cfg_attr(feature = "ts", ts(export))]
17796pub struct HIGH_LATENCY_DATA {
17797    #[doc = "A bitfield for use for autopilot-specific flags."]
17798    pub custom_mode: u32,
17799    #[doc = "Latitude"]
17800    pub latitude: i32,
17801    #[doc = "Longitude"]
17802    pub longitude: i32,
17803    #[doc = "roll"]
17804    pub roll: i16,
17805    #[doc = "pitch"]
17806    pub pitch: i16,
17807    #[doc = "heading"]
17808    pub heading: u16,
17809    #[doc = "heading setpoint"]
17810    pub heading_sp: i16,
17811    #[doc = "Altitude above mean sea level"]
17812    pub altitude_amsl: i16,
17813    #[doc = "Altitude setpoint relative to the home position"]
17814    pub altitude_sp: i16,
17815    #[doc = "distance to target"]
17816    pub wp_distance: u16,
17817    #[doc = "Bitmap of enabled system modes."]
17818    pub base_mode: MavModeFlag,
17819    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
17820    pub landed_state: MavLandedState,
17821    #[doc = "throttle (percentage)"]
17822    pub throttle: i8,
17823    #[doc = "airspeed"]
17824    pub airspeed: u8,
17825    #[doc = "airspeed setpoint"]
17826    pub airspeed_sp: u8,
17827    #[doc = "groundspeed"]
17828    pub groundspeed: u8,
17829    #[doc = "climb rate"]
17830    pub climb_rate: i8,
17831    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
17832    pub gps_nsat: u8,
17833    #[doc = "GPS Fix type."]
17834    pub gps_fix_type: GpsFixType,
17835    #[doc = "Remaining battery (percentage)"]
17836    pub battery_remaining: u8,
17837    #[doc = "Autopilot temperature (degrees C)"]
17838    pub temperature: i8,
17839    #[doc = "Air temperature (degrees C) from airspeed sensor"]
17840    pub temperature_air: i8,
17841    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
17842    pub failsafe: u8,
17843    #[doc = "current waypoint number"]
17844    pub wp_num: u8,
17845}
17846impl HIGH_LATENCY_DATA {
17847    pub const ENCODED_LEN: usize = 40usize;
17848    pub const DEFAULT: Self = Self {
17849        custom_mode: 0_u32,
17850        latitude: 0_i32,
17851        longitude: 0_i32,
17852        roll: 0_i16,
17853        pitch: 0_i16,
17854        heading: 0_u16,
17855        heading_sp: 0_i16,
17856        altitude_amsl: 0_i16,
17857        altitude_sp: 0_i16,
17858        wp_distance: 0_u16,
17859        base_mode: MavModeFlag::DEFAULT,
17860        landed_state: MavLandedState::DEFAULT,
17861        throttle: 0_i8,
17862        airspeed: 0_u8,
17863        airspeed_sp: 0_u8,
17864        groundspeed: 0_u8,
17865        climb_rate: 0_i8,
17866        gps_nsat: 0_u8,
17867        gps_fix_type: GpsFixType::DEFAULT,
17868        battery_remaining: 0_u8,
17869        temperature: 0_i8,
17870        temperature_air: 0_i8,
17871        failsafe: 0_u8,
17872        wp_num: 0_u8,
17873    };
17874    #[cfg(feature = "arbitrary")]
17875    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17876        use arbitrary::{Arbitrary, Unstructured};
17877        let mut buf = [0u8; 1024];
17878        rng.fill_bytes(&mut buf);
17879        let mut unstructured = Unstructured::new(&buf);
17880        Self::arbitrary(&mut unstructured).unwrap_or_default()
17881    }
17882}
17883impl Default for HIGH_LATENCY_DATA {
17884    fn default() -> Self {
17885        Self::DEFAULT.clone()
17886    }
17887}
17888impl MessageData for HIGH_LATENCY_DATA {
17889    type Message = MavMessage;
17890    const ID: u32 = 234u32;
17891    const NAME: &'static str = "HIGH_LATENCY";
17892    const EXTRA_CRC: u8 = 150u8;
17893    const ENCODED_LEN: usize = 40usize;
17894    fn deser(
17895        _version: MavlinkVersion,
17896        __input: &[u8],
17897    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17898        let avail_len = __input.len();
17899        let mut payload_buf = [0; Self::ENCODED_LEN];
17900        let mut buf = if avail_len < Self::ENCODED_LEN {
17901            payload_buf[0..avail_len].copy_from_slice(__input);
17902            Bytes::new(&payload_buf)
17903        } else {
17904            Bytes::new(__input)
17905        };
17906        let mut __struct = Self::default();
17907        __struct.custom_mode = buf.get_u32_le()?;
17908        __struct.latitude = buf.get_i32_le()?;
17909        __struct.longitude = buf.get_i32_le()?;
17910        __struct.roll = buf.get_i16_le()?;
17911        __struct.pitch = buf.get_i16_le()?;
17912        __struct.heading = buf.get_u16_le()?;
17913        __struct.heading_sp = buf.get_i16_le()?;
17914        __struct.altitude_amsl = buf.get_i16_le()?;
17915        __struct.altitude_sp = buf.get_i16_le()?;
17916        __struct.wp_distance = buf.get_u16_le()?;
17917        let tmp = buf.get_u8()?;
17918        __struct.base_mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
17919            ::mavlink_core::error::ParserError::InvalidFlag {
17920                flag_type: "MavModeFlag",
17921                value: tmp as u64,
17922            },
17923        )?;
17924        let tmp = buf.get_u8()?;
17925        __struct.landed_state =
17926            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17927                enum_type: "MavLandedState",
17928                value: tmp as u64,
17929            })?;
17930        __struct.throttle = buf.get_i8()?;
17931        __struct.airspeed = buf.get_u8()?;
17932        __struct.airspeed_sp = buf.get_u8()?;
17933        __struct.groundspeed = buf.get_u8()?;
17934        __struct.climb_rate = buf.get_i8()?;
17935        __struct.gps_nsat = buf.get_u8()?;
17936        let tmp = buf.get_u8()?;
17937        __struct.gps_fix_type =
17938            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17939                enum_type: "GpsFixType",
17940                value: tmp as u64,
17941            })?;
17942        __struct.battery_remaining = buf.get_u8()?;
17943        __struct.temperature = buf.get_i8()?;
17944        __struct.temperature_air = buf.get_i8()?;
17945        __struct.failsafe = buf.get_u8()?;
17946        __struct.wp_num = buf.get_u8()?;
17947        Ok(__struct)
17948    }
17949    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17950        let mut __tmp = BytesMut::new(bytes);
17951        #[allow(clippy::absurd_extreme_comparisons)]
17952        #[allow(unused_comparisons)]
17953        if __tmp.remaining() < Self::ENCODED_LEN {
17954            panic!(
17955                "buffer is too small (need {} bytes, but got {})",
17956                Self::ENCODED_LEN,
17957                __tmp.remaining(),
17958            )
17959        }
17960        __tmp.put_u32_le(self.custom_mode);
17961        __tmp.put_i32_le(self.latitude);
17962        __tmp.put_i32_le(self.longitude);
17963        __tmp.put_i16_le(self.roll);
17964        __tmp.put_i16_le(self.pitch);
17965        __tmp.put_u16_le(self.heading);
17966        __tmp.put_i16_le(self.heading_sp);
17967        __tmp.put_i16_le(self.altitude_amsl);
17968        __tmp.put_i16_le(self.altitude_sp);
17969        __tmp.put_u16_le(self.wp_distance);
17970        __tmp.put_u8(self.base_mode.bits() as u8);
17971        __tmp.put_u8(self.landed_state as u8);
17972        __tmp.put_i8(self.throttle);
17973        __tmp.put_u8(self.airspeed);
17974        __tmp.put_u8(self.airspeed_sp);
17975        __tmp.put_u8(self.groundspeed);
17976        __tmp.put_i8(self.climb_rate);
17977        __tmp.put_u8(self.gps_nsat);
17978        __tmp.put_u8(self.gps_fix_type as u8);
17979        __tmp.put_u8(self.battery_remaining);
17980        __tmp.put_i8(self.temperature);
17981        __tmp.put_i8(self.temperature_air);
17982        __tmp.put_u8(self.failsafe);
17983        __tmp.put_u8(self.wp_num);
17984        if matches!(version, MavlinkVersion::V2) {
17985            let len = __tmp.len();
17986            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17987        } else {
17988            __tmp.len()
17989        }
17990    }
17991}
17992#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
17993#[doc = ""]
17994#[doc = "ID: 235"]
17995#[derive(Debug, Clone, PartialEq)]
17996#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17997#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17998#[cfg_attr(feature = "ts", derive(TS))]
17999#[cfg_attr(feature = "ts", ts(export))]
18000pub struct HIGH_LATENCY2_DATA {
18001    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
18002    pub timestamp: u32,
18003    #[doc = "Latitude"]
18004    pub latitude: i32,
18005    #[doc = "Longitude"]
18006    pub longitude: i32,
18007    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
18008    pub custom_mode: u16,
18009    #[doc = "Altitude above mean sea level"]
18010    pub altitude: i16,
18011    #[doc = "Altitude setpoint"]
18012    pub target_altitude: i16,
18013    #[doc = "Distance to target waypoint or position"]
18014    pub target_distance: u16,
18015    #[doc = "Current waypoint number"]
18016    pub wp_num: u16,
18017    #[doc = "Bitmap of failure flags."]
18018    pub failure_flags: HlFailureFlag,
18019    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
18020    pub mavtype: MavType,
18021    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
18022    pub autopilot: MavAutopilot,
18023    #[doc = "Heading"]
18024    pub heading: u8,
18025    #[doc = "Heading setpoint"]
18026    pub target_heading: u8,
18027    #[doc = "Throttle"]
18028    pub throttle: u8,
18029    #[doc = "Airspeed"]
18030    pub airspeed: u8,
18031    #[doc = "Airspeed setpoint"]
18032    pub airspeed_sp: u8,
18033    #[doc = "Groundspeed"]
18034    pub groundspeed: u8,
18035    #[doc = "Windspeed"]
18036    pub windspeed: u8,
18037    #[doc = "Wind heading"]
18038    pub wind_heading: u8,
18039    #[doc = "Maximum error horizontal position since last message"]
18040    pub eph: u8,
18041    #[doc = "Maximum error vertical position since last message"]
18042    pub epv: u8,
18043    #[doc = "Air temperature"]
18044    pub temperature_air: i8,
18045    #[doc = "Maximum climb rate magnitude since last message"]
18046    pub climb_rate: i8,
18047    #[doc = "Battery level (-1 if field not provided)."]
18048    pub battery: i8,
18049    #[doc = "Field for custom payload."]
18050    pub custom0: i8,
18051    #[doc = "Field for custom payload."]
18052    pub custom1: i8,
18053    #[doc = "Field for custom payload."]
18054    pub custom2: i8,
18055}
18056impl HIGH_LATENCY2_DATA {
18057    pub const ENCODED_LEN: usize = 42usize;
18058    pub const DEFAULT: Self = Self {
18059        timestamp: 0_u32,
18060        latitude: 0_i32,
18061        longitude: 0_i32,
18062        custom_mode: 0_u16,
18063        altitude: 0_i16,
18064        target_altitude: 0_i16,
18065        target_distance: 0_u16,
18066        wp_num: 0_u16,
18067        failure_flags: HlFailureFlag::DEFAULT,
18068        mavtype: MavType::DEFAULT,
18069        autopilot: MavAutopilot::DEFAULT,
18070        heading: 0_u8,
18071        target_heading: 0_u8,
18072        throttle: 0_u8,
18073        airspeed: 0_u8,
18074        airspeed_sp: 0_u8,
18075        groundspeed: 0_u8,
18076        windspeed: 0_u8,
18077        wind_heading: 0_u8,
18078        eph: 0_u8,
18079        epv: 0_u8,
18080        temperature_air: 0_i8,
18081        climb_rate: 0_i8,
18082        battery: 0_i8,
18083        custom0: 0_i8,
18084        custom1: 0_i8,
18085        custom2: 0_i8,
18086    };
18087    #[cfg(feature = "arbitrary")]
18088    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18089        use arbitrary::{Arbitrary, Unstructured};
18090        let mut buf = [0u8; 1024];
18091        rng.fill_bytes(&mut buf);
18092        let mut unstructured = Unstructured::new(&buf);
18093        Self::arbitrary(&mut unstructured).unwrap_or_default()
18094    }
18095}
18096impl Default for HIGH_LATENCY2_DATA {
18097    fn default() -> Self {
18098        Self::DEFAULT.clone()
18099    }
18100}
18101impl MessageData for HIGH_LATENCY2_DATA {
18102    type Message = MavMessage;
18103    const ID: u32 = 235u32;
18104    const NAME: &'static str = "HIGH_LATENCY2";
18105    const EXTRA_CRC: u8 = 179u8;
18106    const ENCODED_LEN: usize = 42usize;
18107    fn deser(
18108        _version: MavlinkVersion,
18109        __input: &[u8],
18110    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18111        let avail_len = __input.len();
18112        let mut payload_buf = [0; Self::ENCODED_LEN];
18113        let mut buf = if avail_len < Self::ENCODED_LEN {
18114            payload_buf[0..avail_len].copy_from_slice(__input);
18115            Bytes::new(&payload_buf)
18116        } else {
18117            Bytes::new(__input)
18118        };
18119        let mut __struct = Self::default();
18120        __struct.timestamp = buf.get_u32_le()?;
18121        __struct.latitude = buf.get_i32_le()?;
18122        __struct.longitude = buf.get_i32_le()?;
18123        __struct.custom_mode = buf.get_u16_le()?;
18124        __struct.altitude = buf.get_i16_le()?;
18125        __struct.target_altitude = buf.get_i16_le()?;
18126        __struct.target_distance = buf.get_u16_le()?;
18127        __struct.wp_num = buf.get_u16_le()?;
18128        let tmp = buf.get_u16_le()?;
18129        __struct.failure_flags = HlFailureFlag::from_bits(tmp as <HlFailureFlag as Flags>::Bits)
18130            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
18131                flag_type: "HlFailureFlag",
18132                value: tmp as u64,
18133            })?;
18134        let tmp = buf.get_u8()?;
18135        __struct.mavtype =
18136            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18137                enum_type: "MavType",
18138                value: tmp as u64,
18139            })?;
18140        let tmp = buf.get_u8()?;
18141        __struct.autopilot =
18142            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18143                enum_type: "MavAutopilot",
18144                value: tmp as u64,
18145            })?;
18146        __struct.heading = buf.get_u8()?;
18147        __struct.target_heading = buf.get_u8()?;
18148        __struct.throttle = buf.get_u8()?;
18149        __struct.airspeed = buf.get_u8()?;
18150        __struct.airspeed_sp = buf.get_u8()?;
18151        __struct.groundspeed = buf.get_u8()?;
18152        __struct.windspeed = buf.get_u8()?;
18153        __struct.wind_heading = buf.get_u8()?;
18154        __struct.eph = buf.get_u8()?;
18155        __struct.epv = buf.get_u8()?;
18156        __struct.temperature_air = buf.get_i8()?;
18157        __struct.climb_rate = buf.get_i8()?;
18158        __struct.battery = buf.get_i8()?;
18159        __struct.custom0 = buf.get_i8()?;
18160        __struct.custom1 = buf.get_i8()?;
18161        __struct.custom2 = buf.get_i8()?;
18162        Ok(__struct)
18163    }
18164    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18165        let mut __tmp = BytesMut::new(bytes);
18166        #[allow(clippy::absurd_extreme_comparisons)]
18167        #[allow(unused_comparisons)]
18168        if __tmp.remaining() < Self::ENCODED_LEN {
18169            panic!(
18170                "buffer is too small (need {} bytes, but got {})",
18171                Self::ENCODED_LEN,
18172                __tmp.remaining(),
18173            )
18174        }
18175        __tmp.put_u32_le(self.timestamp);
18176        __tmp.put_i32_le(self.latitude);
18177        __tmp.put_i32_le(self.longitude);
18178        __tmp.put_u16_le(self.custom_mode);
18179        __tmp.put_i16_le(self.altitude);
18180        __tmp.put_i16_le(self.target_altitude);
18181        __tmp.put_u16_le(self.target_distance);
18182        __tmp.put_u16_le(self.wp_num);
18183        __tmp.put_u16_le(self.failure_flags.bits() as u16);
18184        __tmp.put_u8(self.mavtype as u8);
18185        __tmp.put_u8(self.autopilot as u8);
18186        __tmp.put_u8(self.heading);
18187        __tmp.put_u8(self.target_heading);
18188        __tmp.put_u8(self.throttle);
18189        __tmp.put_u8(self.airspeed);
18190        __tmp.put_u8(self.airspeed_sp);
18191        __tmp.put_u8(self.groundspeed);
18192        __tmp.put_u8(self.windspeed);
18193        __tmp.put_u8(self.wind_heading);
18194        __tmp.put_u8(self.eph);
18195        __tmp.put_u8(self.epv);
18196        __tmp.put_i8(self.temperature_air);
18197        __tmp.put_i8(self.climb_rate);
18198        __tmp.put_i8(self.battery);
18199        __tmp.put_i8(self.custom0);
18200        __tmp.put_i8(self.custom1);
18201        __tmp.put_i8(self.custom2);
18202        if matches!(version, MavlinkVersion::V2) {
18203            let len = __tmp.len();
18204            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18205        } else {
18206            __tmp.len()
18207        }
18208    }
18209}
18210#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
18211#[doc = ""]
18212#[doc = "ID: 93"]
18213#[derive(Debug, Clone, PartialEq)]
18214#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18215#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18216#[cfg_attr(feature = "ts", derive(TS))]
18217#[cfg_attr(feature = "ts", ts(export))]
18218pub struct HIL_ACTUATOR_CONTROLS_DATA {
18219    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18220    pub time_usec: u64,
18221    #[doc = "Flags bitmask."]
18222    pub flags: HilActuatorControlsFlags,
18223    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
18224    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18225    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18226    pub controls: [f32; 16],
18227    #[doc = "System mode. Includes arming state."]
18228    pub mode: MavModeFlag,
18229}
18230impl HIL_ACTUATOR_CONTROLS_DATA {
18231    pub const ENCODED_LEN: usize = 81usize;
18232    pub const DEFAULT: Self = Self {
18233        time_usec: 0_u64,
18234        flags: HilActuatorControlsFlags::DEFAULT,
18235        controls: [0.0_f32; 16usize],
18236        mode: MavModeFlag::DEFAULT,
18237    };
18238    #[cfg(feature = "arbitrary")]
18239    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18240        use arbitrary::{Arbitrary, Unstructured};
18241        let mut buf = [0u8; 1024];
18242        rng.fill_bytes(&mut buf);
18243        let mut unstructured = Unstructured::new(&buf);
18244        Self::arbitrary(&mut unstructured).unwrap_or_default()
18245    }
18246}
18247impl Default for HIL_ACTUATOR_CONTROLS_DATA {
18248    fn default() -> Self {
18249        Self::DEFAULT.clone()
18250    }
18251}
18252impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
18253    type Message = MavMessage;
18254    const ID: u32 = 93u32;
18255    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
18256    const EXTRA_CRC: u8 = 47u8;
18257    const ENCODED_LEN: usize = 81usize;
18258    fn deser(
18259        _version: MavlinkVersion,
18260        __input: &[u8],
18261    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18262        let avail_len = __input.len();
18263        let mut payload_buf = [0; Self::ENCODED_LEN];
18264        let mut buf = if avail_len < Self::ENCODED_LEN {
18265            payload_buf[0..avail_len].copy_from_slice(__input);
18266            Bytes::new(&payload_buf)
18267        } else {
18268            Bytes::new(__input)
18269        };
18270        let mut __struct = Self::default();
18271        __struct.time_usec = buf.get_u64_le()?;
18272        let tmp = buf.get_u64_le()?;
18273        __struct.flags =
18274            HilActuatorControlsFlags::from_bits(tmp as <HilActuatorControlsFlags as Flags>::Bits)
18275                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
18276                flag_type: "HilActuatorControlsFlags",
18277                value: tmp as u64,
18278            })?;
18279        for v in &mut __struct.controls {
18280            let val = buf.get_f32_le()?;
18281            *v = val;
18282        }
18283        let tmp = buf.get_u8()?;
18284        __struct.mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
18285            ::mavlink_core::error::ParserError::InvalidFlag {
18286                flag_type: "MavModeFlag",
18287                value: tmp as u64,
18288            },
18289        )?;
18290        Ok(__struct)
18291    }
18292    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18293        let mut __tmp = BytesMut::new(bytes);
18294        #[allow(clippy::absurd_extreme_comparisons)]
18295        #[allow(unused_comparisons)]
18296        if __tmp.remaining() < Self::ENCODED_LEN {
18297            panic!(
18298                "buffer is too small (need {} bytes, but got {})",
18299                Self::ENCODED_LEN,
18300                __tmp.remaining(),
18301            )
18302        }
18303        __tmp.put_u64_le(self.time_usec);
18304        __tmp.put_u64_le(self.flags.bits() as u64);
18305        for val in &self.controls {
18306            __tmp.put_f32_le(*val);
18307        }
18308        __tmp.put_u8(self.mode.bits() as u8);
18309        if matches!(version, MavlinkVersion::V2) {
18310            let len = __tmp.len();
18311            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18312        } else {
18313            __tmp.len()
18314        }
18315    }
18316}
18317#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
18318#[doc = ""]
18319#[doc = "ID: 91"]
18320#[derive(Debug, Clone, PartialEq)]
18321#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18322#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18323#[cfg_attr(feature = "ts", derive(TS))]
18324#[cfg_attr(feature = "ts", ts(export))]
18325pub struct HIL_CONTROLS_DATA {
18326    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18327    pub time_usec: u64,
18328    #[doc = "Control output -1 .. 1"]
18329    pub roll_ailerons: f32,
18330    #[doc = "Control output -1 .. 1"]
18331    pub pitch_elevator: f32,
18332    #[doc = "Control output -1 .. 1"]
18333    pub yaw_rudder: f32,
18334    #[doc = "Throttle 0 .. 1"]
18335    pub throttle: f32,
18336    #[doc = "Aux 1, -1 .. 1"]
18337    pub aux1: f32,
18338    #[doc = "Aux 2, -1 .. 1"]
18339    pub aux2: f32,
18340    #[doc = "Aux 3, -1 .. 1"]
18341    pub aux3: f32,
18342    #[doc = "Aux 4, -1 .. 1"]
18343    pub aux4: f32,
18344    #[doc = "System mode."]
18345    pub mode: MavMode,
18346    #[doc = "Navigation mode (MAV_NAV_MODE)"]
18347    pub nav_mode: u8,
18348}
18349impl HIL_CONTROLS_DATA {
18350    pub const ENCODED_LEN: usize = 42usize;
18351    pub const DEFAULT: Self = Self {
18352        time_usec: 0_u64,
18353        roll_ailerons: 0.0_f32,
18354        pitch_elevator: 0.0_f32,
18355        yaw_rudder: 0.0_f32,
18356        throttle: 0.0_f32,
18357        aux1: 0.0_f32,
18358        aux2: 0.0_f32,
18359        aux3: 0.0_f32,
18360        aux4: 0.0_f32,
18361        mode: MavMode::DEFAULT,
18362        nav_mode: 0_u8,
18363    };
18364    #[cfg(feature = "arbitrary")]
18365    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18366        use arbitrary::{Arbitrary, Unstructured};
18367        let mut buf = [0u8; 1024];
18368        rng.fill_bytes(&mut buf);
18369        let mut unstructured = Unstructured::new(&buf);
18370        Self::arbitrary(&mut unstructured).unwrap_or_default()
18371    }
18372}
18373impl Default for HIL_CONTROLS_DATA {
18374    fn default() -> Self {
18375        Self::DEFAULT.clone()
18376    }
18377}
18378impl MessageData for HIL_CONTROLS_DATA {
18379    type Message = MavMessage;
18380    const ID: u32 = 91u32;
18381    const NAME: &'static str = "HIL_CONTROLS";
18382    const EXTRA_CRC: u8 = 63u8;
18383    const ENCODED_LEN: usize = 42usize;
18384    fn deser(
18385        _version: MavlinkVersion,
18386        __input: &[u8],
18387    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18388        let avail_len = __input.len();
18389        let mut payload_buf = [0; Self::ENCODED_LEN];
18390        let mut buf = if avail_len < Self::ENCODED_LEN {
18391            payload_buf[0..avail_len].copy_from_slice(__input);
18392            Bytes::new(&payload_buf)
18393        } else {
18394            Bytes::new(__input)
18395        };
18396        let mut __struct = Self::default();
18397        __struct.time_usec = buf.get_u64_le()?;
18398        __struct.roll_ailerons = buf.get_f32_le()?;
18399        __struct.pitch_elevator = buf.get_f32_le()?;
18400        __struct.yaw_rudder = buf.get_f32_le()?;
18401        __struct.throttle = buf.get_f32_le()?;
18402        __struct.aux1 = buf.get_f32_le()?;
18403        __struct.aux2 = buf.get_f32_le()?;
18404        __struct.aux3 = buf.get_f32_le()?;
18405        __struct.aux4 = buf.get_f32_le()?;
18406        let tmp = buf.get_u8()?;
18407        __struct.mode =
18408            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18409                enum_type: "MavMode",
18410                value: tmp as u64,
18411            })?;
18412        __struct.nav_mode = buf.get_u8()?;
18413        Ok(__struct)
18414    }
18415    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18416        let mut __tmp = BytesMut::new(bytes);
18417        #[allow(clippy::absurd_extreme_comparisons)]
18418        #[allow(unused_comparisons)]
18419        if __tmp.remaining() < Self::ENCODED_LEN {
18420            panic!(
18421                "buffer is too small (need {} bytes, but got {})",
18422                Self::ENCODED_LEN,
18423                __tmp.remaining(),
18424            )
18425        }
18426        __tmp.put_u64_le(self.time_usec);
18427        __tmp.put_f32_le(self.roll_ailerons);
18428        __tmp.put_f32_le(self.pitch_elevator);
18429        __tmp.put_f32_le(self.yaw_rudder);
18430        __tmp.put_f32_le(self.throttle);
18431        __tmp.put_f32_le(self.aux1);
18432        __tmp.put_f32_le(self.aux2);
18433        __tmp.put_f32_le(self.aux3);
18434        __tmp.put_f32_le(self.aux4);
18435        __tmp.put_u8(self.mode as u8);
18436        __tmp.put_u8(self.nav_mode);
18437        if matches!(version, MavlinkVersion::V2) {
18438            let len = __tmp.len();
18439            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18440        } else {
18441            __tmp.len()
18442        }
18443    }
18444}
18445#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
18446#[doc = ""]
18447#[doc = "ID: 113"]
18448#[derive(Debug, Clone, PartialEq)]
18449#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18450#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18451#[cfg_attr(feature = "ts", derive(TS))]
18452#[cfg_attr(feature = "ts", ts(export))]
18453pub struct HIL_GPS_DATA {
18454    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18455    pub time_usec: u64,
18456    #[doc = "Latitude (WGS84)"]
18457    pub lat: i32,
18458    #[doc = "Longitude (WGS84)"]
18459    pub lon: i32,
18460    #[doc = "Altitude (MSL). Positive for up."]
18461    pub alt: i32,
18462    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
18463    pub eph: u16,
18464    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
18465    pub epv: u16,
18466    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
18467    pub vel: u16,
18468    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
18469    pub vn: i16,
18470    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
18471    pub ve: i16,
18472    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
18473    pub vd: i16,
18474    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
18475    pub cog: u16,
18476    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
18477    pub fix_type: u8,
18478    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
18479    pub satellites_visible: u8,
18480    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
18481    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18482    pub id: u8,
18483    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
18484    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18485    pub yaw: u16,
18486}
18487impl HIL_GPS_DATA {
18488    pub const ENCODED_LEN: usize = 39usize;
18489    pub const DEFAULT: Self = Self {
18490        time_usec: 0_u64,
18491        lat: 0_i32,
18492        lon: 0_i32,
18493        alt: 0_i32,
18494        eph: 0_u16,
18495        epv: 0_u16,
18496        vel: 0_u16,
18497        vn: 0_i16,
18498        ve: 0_i16,
18499        vd: 0_i16,
18500        cog: 0_u16,
18501        fix_type: 0_u8,
18502        satellites_visible: 0_u8,
18503        id: 0_u8,
18504        yaw: 0_u16,
18505    };
18506    #[cfg(feature = "arbitrary")]
18507    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18508        use arbitrary::{Arbitrary, Unstructured};
18509        let mut buf = [0u8; 1024];
18510        rng.fill_bytes(&mut buf);
18511        let mut unstructured = Unstructured::new(&buf);
18512        Self::arbitrary(&mut unstructured).unwrap_or_default()
18513    }
18514}
18515impl Default for HIL_GPS_DATA {
18516    fn default() -> Self {
18517        Self::DEFAULT.clone()
18518    }
18519}
18520impl MessageData for HIL_GPS_DATA {
18521    type Message = MavMessage;
18522    const ID: u32 = 113u32;
18523    const NAME: &'static str = "HIL_GPS";
18524    const EXTRA_CRC: u8 = 124u8;
18525    const ENCODED_LEN: usize = 39usize;
18526    fn deser(
18527        _version: MavlinkVersion,
18528        __input: &[u8],
18529    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18530        let avail_len = __input.len();
18531        let mut payload_buf = [0; Self::ENCODED_LEN];
18532        let mut buf = if avail_len < Self::ENCODED_LEN {
18533            payload_buf[0..avail_len].copy_from_slice(__input);
18534            Bytes::new(&payload_buf)
18535        } else {
18536            Bytes::new(__input)
18537        };
18538        let mut __struct = Self::default();
18539        __struct.time_usec = buf.get_u64_le()?;
18540        __struct.lat = buf.get_i32_le()?;
18541        __struct.lon = buf.get_i32_le()?;
18542        __struct.alt = buf.get_i32_le()?;
18543        __struct.eph = buf.get_u16_le()?;
18544        __struct.epv = buf.get_u16_le()?;
18545        __struct.vel = buf.get_u16_le()?;
18546        __struct.vn = buf.get_i16_le()?;
18547        __struct.ve = buf.get_i16_le()?;
18548        __struct.vd = buf.get_i16_le()?;
18549        __struct.cog = buf.get_u16_le()?;
18550        __struct.fix_type = buf.get_u8()?;
18551        __struct.satellites_visible = buf.get_u8()?;
18552        __struct.id = buf.get_u8()?;
18553        __struct.yaw = buf.get_u16_le()?;
18554        Ok(__struct)
18555    }
18556    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18557        let mut __tmp = BytesMut::new(bytes);
18558        #[allow(clippy::absurd_extreme_comparisons)]
18559        #[allow(unused_comparisons)]
18560        if __tmp.remaining() < Self::ENCODED_LEN {
18561            panic!(
18562                "buffer is too small (need {} bytes, but got {})",
18563                Self::ENCODED_LEN,
18564                __tmp.remaining(),
18565            )
18566        }
18567        __tmp.put_u64_le(self.time_usec);
18568        __tmp.put_i32_le(self.lat);
18569        __tmp.put_i32_le(self.lon);
18570        __tmp.put_i32_le(self.alt);
18571        __tmp.put_u16_le(self.eph);
18572        __tmp.put_u16_le(self.epv);
18573        __tmp.put_u16_le(self.vel);
18574        __tmp.put_i16_le(self.vn);
18575        __tmp.put_i16_le(self.ve);
18576        __tmp.put_i16_le(self.vd);
18577        __tmp.put_u16_le(self.cog);
18578        __tmp.put_u8(self.fix_type);
18579        __tmp.put_u8(self.satellites_visible);
18580        if matches!(version, MavlinkVersion::V2) {
18581            __tmp.put_u8(self.id);
18582            __tmp.put_u16_le(self.yaw);
18583            let len = __tmp.len();
18584            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18585        } else {
18586            __tmp.len()
18587        }
18588    }
18589}
18590#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
18591#[doc = ""]
18592#[doc = "ID: 114"]
18593#[derive(Debug, Clone, PartialEq)]
18594#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18595#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18596#[cfg_attr(feature = "ts", derive(TS))]
18597#[cfg_attr(feature = "ts", ts(export))]
18598pub struct HIL_OPTICAL_FLOW_DATA {
18599    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18600    pub time_usec: u64,
18601    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
18602    pub integration_time_us: u32,
18603    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
18604    pub integrated_x: f32,
18605    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
18606    pub integrated_y: f32,
18607    #[doc = "RH rotation around X axis"]
18608    pub integrated_xgyro: f32,
18609    #[doc = "RH rotation around Y axis"]
18610    pub integrated_ygyro: f32,
18611    #[doc = "RH rotation around Z axis"]
18612    pub integrated_zgyro: f32,
18613    #[doc = "Time since the distance was sampled."]
18614    pub time_delta_distance_us: u32,
18615    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
18616    pub distance: f32,
18617    #[doc = "Temperature"]
18618    pub temperature: i16,
18619    #[doc = "Sensor ID"]
18620    pub sensor_id: u8,
18621    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
18622    pub quality: u8,
18623}
18624impl HIL_OPTICAL_FLOW_DATA {
18625    pub const ENCODED_LEN: usize = 44usize;
18626    pub const DEFAULT: Self = Self {
18627        time_usec: 0_u64,
18628        integration_time_us: 0_u32,
18629        integrated_x: 0.0_f32,
18630        integrated_y: 0.0_f32,
18631        integrated_xgyro: 0.0_f32,
18632        integrated_ygyro: 0.0_f32,
18633        integrated_zgyro: 0.0_f32,
18634        time_delta_distance_us: 0_u32,
18635        distance: 0.0_f32,
18636        temperature: 0_i16,
18637        sensor_id: 0_u8,
18638        quality: 0_u8,
18639    };
18640    #[cfg(feature = "arbitrary")]
18641    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18642        use arbitrary::{Arbitrary, Unstructured};
18643        let mut buf = [0u8; 1024];
18644        rng.fill_bytes(&mut buf);
18645        let mut unstructured = Unstructured::new(&buf);
18646        Self::arbitrary(&mut unstructured).unwrap_or_default()
18647    }
18648}
18649impl Default for HIL_OPTICAL_FLOW_DATA {
18650    fn default() -> Self {
18651        Self::DEFAULT.clone()
18652    }
18653}
18654impl MessageData for HIL_OPTICAL_FLOW_DATA {
18655    type Message = MavMessage;
18656    const ID: u32 = 114u32;
18657    const NAME: &'static str = "HIL_OPTICAL_FLOW";
18658    const EXTRA_CRC: u8 = 237u8;
18659    const ENCODED_LEN: usize = 44usize;
18660    fn deser(
18661        _version: MavlinkVersion,
18662        __input: &[u8],
18663    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18664        let avail_len = __input.len();
18665        let mut payload_buf = [0; Self::ENCODED_LEN];
18666        let mut buf = if avail_len < Self::ENCODED_LEN {
18667            payload_buf[0..avail_len].copy_from_slice(__input);
18668            Bytes::new(&payload_buf)
18669        } else {
18670            Bytes::new(__input)
18671        };
18672        let mut __struct = Self::default();
18673        __struct.time_usec = buf.get_u64_le()?;
18674        __struct.integration_time_us = buf.get_u32_le()?;
18675        __struct.integrated_x = buf.get_f32_le()?;
18676        __struct.integrated_y = buf.get_f32_le()?;
18677        __struct.integrated_xgyro = buf.get_f32_le()?;
18678        __struct.integrated_ygyro = buf.get_f32_le()?;
18679        __struct.integrated_zgyro = buf.get_f32_le()?;
18680        __struct.time_delta_distance_us = buf.get_u32_le()?;
18681        __struct.distance = buf.get_f32_le()?;
18682        __struct.temperature = buf.get_i16_le()?;
18683        __struct.sensor_id = buf.get_u8()?;
18684        __struct.quality = buf.get_u8()?;
18685        Ok(__struct)
18686    }
18687    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18688        let mut __tmp = BytesMut::new(bytes);
18689        #[allow(clippy::absurd_extreme_comparisons)]
18690        #[allow(unused_comparisons)]
18691        if __tmp.remaining() < Self::ENCODED_LEN {
18692            panic!(
18693                "buffer is too small (need {} bytes, but got {})",
18694                Self::ENCODED_LEN,
18695                __tmp.remaining(),
18696            )
18697        }
18698        __tmp.put_u64_le(self.time_usec);
18699        __tmp.put_u32_le(self.integration_time_us);
18700        __tmp.put_f32_le(self.integrated_x);
18701        __tmp.put_f32_le(self.integrated_y);
18702        __tmp.put_f32_le(self.integrated_xgyro);
18703        __tmp.put_f32_le(self.integrated_ygyro);
18704        __tmp.put_f32_le(self.integrated_zgyro);
18705        __tmp.put_u32_le(self.time_delta_distance_us);
18706        __tmp.put_f32_le(self.distance);
18707        __tmp.put_i16_le(self.temperature);
18708        __tmp.put_u8(self.sensor_id);
18709        __tmp.put_u8(self.quality);
18710        if matches!(version, MavlinkVersion::V2) {
18711            let len = __tmp.len();
18712            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18713        } else {
18714            __tmp.len()
18715        }
18716    }
18717}
18718#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
18719#[doc = ""]
18720#[doc = "ID: 92"]
18721#[derive(Debug, Clone, PartialEq)]
18722#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18723#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18724#[cfg_attr(feature = "ts", derive(TS))]
18725#[cfg_attr(feature = "ts", ts(export))]
18726pub struct HIL_RC_INPUTS_RAW_DATA {
18727    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18728    pub time_usec: u64,
18729    #[doc = "RC channel 1 value"]
18730    pub chan1_raw: u16,
18731    #[doc = "RC channel 2 value"]
18732    pub chan2_raw: u16,
18733    #[doc = "RC channel 3 value"]
18734    pub chan3_raw: u16,
18735    #[doc = "RC channel 4 value"]
18736    pub chan4_raw: u16,
18737    #[doc = "RC channel 5 value"]
18738    pub chan5_raw: u16,
18739    #[doc = "RC channel 6 value"]
18740    pub chan6_raw: u16,
18741    #[doc = "RC channel 7 value"]
18742    pub chan7_raw: u16,
18743    #[doc = "RC channel 8 value"]
18744    pub chan8_raw: u16,
18745    #[doc = "RC channel 9 value"]
18746    pub chan9_raw: u16,
18747    #[doc = "RC channel 10 value"]
18748    pub chan10_raw: u16,
18749    #[doc = "RC channel 11 value"]
18750    pub chan11_raw: u16,
18751    #[doc = "RC channel 12 value"]
18752    pub chan12_raw: u16,
18753    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
18754    pub rssi: u8,
18755}
18756impl HIL_RC_INPUTS_RAW_DATA {
18757    pub const ENCODED_LEN: usize = 33usize;
18758    pub const DEFAULT: Self = Self {
18759        time_usec: 0_u64,
18760        chan1_raw: 0_u16,
18761        chan2_raw: 0_u16,
18762        chan3_raw: 0_u16,
18763        chan4_raw: 0_u16,
18764        chan5_raw: 0_u16,
18765        chan6_raw: 0_u16,
18766        chan7_raw: 0_u16,
18767        chan8_raw: 0_u16,
18768        chan9_raw: 0_u16,
18769        chan10_raw: 0_u16,
18770        chan11_raw: 0_u16,
18771        chan12_raw: 0_u16,
18772        rssi: 0_u8,
18773    };
18774    #[cfg(feature = "arbitrary")]
18775    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18776        use arbitrary::{Arbitrary, Unstructured};
18777        let mut buf = [0u8; 1024];
18778        rng.fill_bytes(&mut buf);
18779        let mut unstructured = Unstructured::new(&buf);
18780        Self::arbitrary(&mut unstructured).unwrap_or_default()
18781    }
18782}
18783impl Default for HIL_RC_INPUTS_RAW_DATA {
18784    fn default() -> Self {
18785        Self::DEFAULT.clone()
18786    }
18787}
18788impl MessageData for HIL_RC_INPUTS_RAW_DATA {
18789    type Message = MavMessage;
18790    const ID: u32 = 92u32;
18791    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
18792    const EXTRA_CRC: u8 = 54u8;
18793    const ENCODED_LEN: usize = 33usize;
18794    fn deser(
18795        _version: MavlinkVersion,
18796        __input: &[u8],
18797    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18798        let avail_len = __input.len();
18799        let mut payload_buf = [0; Self::ENCODED_LEN];
18800        let mut buf = if avail_len < Self::ENCODED_LEN {
18801            payload_buf[0..avail_len].copy_from_slice(__input);
18802            Bytes::new(&payload_buf)
18803        } else {
18804            Bytes::new(__input)
18805        };
18806        let mut __struct = Self::default();
18807        __struct.time_usec = buf.get_u64_le()?;
18808        __struct.chan1_raw = buf.get_u16_le()?;
18809        __struct.chan2_raw = buf.get_u16_le()?;
18810        __struct.chan3_raw = buf.get_u16_le()?;
18811        __struct.chan4_raw = buf.get_u16_le()?;
18812        __struct.chan5_raw = buf.get_u16_le()?;
18813        __struct.chan6_raw = buf.get_u16_le()?;
18814        __struct.chan7_raw = buf.get_u16_le()?;
18815        __struct.chan8_raw = buf.get_u16_le()?;
18816        __struct.chan9_raw = buf.get_u16_le()?;
18817        __struct.chan10_raw = buf.get_u16_le()?;
18818        __struct.chan11_raw = buf.get_u16_le()?;
18819        __struct.chan12_raw = buf.get_u16_le()?;
18820        __struct.rssi = buf.get_u8()?;
18821        Ok(__struct)
18822    }
18823    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18824        let mut __tmp = BytesMut::new(bytes);
18825        #[allow(clippy::absurd_extreme_comparisons)]
18826        #[allow(unused_comparisons)]
18827        if __tmp.remaining() < Self::ENCODED_LEN {
18828            panic!(
18829                "buffer is too small (need {} bytes, but got {})",
18830                Self::ENCODED_LEN,
18831                __tmp.remaining(),
18832            )
18833        }
18834        __tmp.put_u64_le(self.time_usec);
18835        __tmp.put_u16_le(self.chan1_raw);
18836        __tmp.put_u16_le(self.chan2_raw);
18837        __tmp.put_u16_le(self.chan3_raw);
18838        __tmp.put_u16_le(self.chan4_raw);
18839        __tmp.put_u16_le(self.chan5_raw);
18840        __tmp.put_u16_le(self.chan6_raw);
18841        __tmp.put_u16_le(self.chan7_raw);
18842        __tmp.put_u16_le(self.chan8_raw);
18843        __tmp.put_u16_le(self.chan9_raw);
18844        __tmp.put_u16_le(self.chan10_raw);
18845        __tmp.put_u16_le(self.chan11_raw);
18846        __tmp.put_u16_le(self.chan12_raw);
18847        __tmp.put_u8(self.rssi);
18848        if matches!(version, MavlinkVersion::V2) {
18849            let len = __tmp.len();
18850            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18851        } else {
18852            __tmp.len()
18853        }
18854    }
18855}
18856#[doc = "The IMU readings in SI units in NED body frame."]
18857#[doc = ""]
18858#[doc = "ID: 107"]
18859#[derive(Debug, Clone, PartialEq)]
18860#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18861#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18862#[cfg_attr(feature = "ts", derive(TS))]
18863#[cfg_attr(feature = "ts", ts(export))]
18864pub struct HIL_SENSOR_DATA {
18865    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18866    pub time_usec: u64,
18867    #[doc = "X acceleration"]
18868    pub xacc: f32,
18869    #[doc = "Y acceleration"]
18870    pub yacc: f32,
18871    #[doc = "Z acceleration"]
18872    pub zacc: f32,
18873    #[doc = "Angular speed around X axis in body frame"]
18874    pub xgyro: f32,
18875    #[doc = "Angular speed around Y axis in body frame"]
18876    pub ygyro: f32,
18877    #[doc = "Angular speed around Z axis in body frame"]
18878    pub zgyro: f32,
18879    #[doc = "X Magnetic field"]
18880    pub xmag: f32,
18881    #[doc = "Y Magnetic field"]
18882    pub ymag: f32,
18883    #[doc = "Z Magnetic field"]
18884    pub zmag: f32,
18885    #[doc = "Absolute pressure"]
18886    pub abs_pressure: f32,
18887    #[doc = "Differential pressure (airspeed)"]
18888    pub diff_pressure: f32,
18889    #[doc = "Altitude calculated from pressure"]
18890    pub pressure_alt: f32,
18891    #[doc = "Temperature"]
18892    pub temperature: f32,
18893    #[doc = "Bitmap for fields that have updated since last message"]
18894    pub fields_updated: HilSensorUpdatedFlags,
18895    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
18896    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18897    pub id: u8,
18898}
18899impl HIL_SENSOR_DATA {
18900    pub const ENCODED_LEN: usize = 65usize;
18901    pub const DEFAULT: Self = Self {
18902        time_usec: 0_u64,
18903        xacc: 0.0_f32,
18904        yacc: 0.0_f32,
18905        zacc: 0.0_f32,
18906        xgyro: 0.0_f32,
18907        ygyro: 0.0_f32,
18908        zgyro: 0.0_f32,
18909        xmag: 0.0_f32,
18910        ymag: 0.0_f32,
18911        zmag: 0.0_f32,
18912        abs_pressure: 0.0_f32,
18913        diff_pressure: 0.0_f32,
18914        pressure_alt: 0.0_f32,
18915        temperature: 0.0_f32,
18916        fields_updated: HilSensorUpdatedFlags::DEFAULT,
18917        id: 0_u8,
18918    };
18919    #[cfg(feature = "arbitrary")]
18920    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18921        use arbitrary::{Arbitrary, Unstructured};
18922        let mut buf = [0u8; 1024];
18923        rng.fill_bytes(&mut buf);
18924        let mut unstructured = Unstructured::new(&buf);
18925        Self::arbitrary(&mut unstructured).unwrap_or_default()
18926    }
18927}
18928impl Default for HIL_SENSOR_DATA {
18929    fn default() -> Self {
18930        Self::DEFAULT.clone()
18931    }
18932}
18933impl MessageData for HIL_SENSOR_DATA {
18934    type Message = MavMessage;
18935    const ID: u32 = 107u32;
18936    const NAME: &'static str = "HIL_SENSOR";
18937    const EXTRA_CRC: u8 = 108u8;
18938    const ENCODED_LEN: usize = 65usize;
18939    fn deser(
18940        _version: MavlinkVersion,
18941        __input: &[u8],
18942    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18943        let avail_len = __input.len();
18944        let mut payload_buf = [0; Self::ENCODED_LEN];
18945        let mut buf = if avail_len < Self::ENCODED_LEN {
18946            payload_buf[0..avail_len].copy_from_slice(__input);
18947            Bytes::new(&payload_buf)
18948        } else {
18949            Bytes::new(__input)
18950        };
18951        let mut __struct = Self::default();
18952        __struct.time_usec = buf.get_u64_le()?;
18953        __struct.xacc = buf.get_f32_le()?;
18954        __struct.yacc = buf.get_f32_le()?;
18955        __struct.zacc = buf.get_f32_le()?;
18956        __struct.xgyro = buf.get_f32_le()?;
18957        __struct.ygyro = buf.get_f32_le()?;
18958        __struct.zgyro = buf.get_f32_le()?;
18959        __struct.xmag = buf.get_f32_le()?;
18960        __struct.ymag = buf.get_f32_le()?;
18961        __struct.zmag = buf.get_f32_le()?;
18962        __struct.abs_pressure = buf.get_f32_le()?;
18963        __struct.diff_pressure = buf.get_f32_le()?;
18964        __struct.pressure_alt = buf.get_f32_le()?;
18965        __struct.temperature = buf.get_f32_le()?;
18966        let tmp = buf.get_u32_le()?;
18967        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
18968            tmp as <HilSensorUpdatedFlags as Flags>::Bits,
18969        )
18970        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
18971            flag_type: "HilSensorUpdatedFlags",
18972            value: tmp as u64,
18973        })?;
18974        __struct.id = buf.get_u8()?;
18975        Ok(__struct)
18976    }
18977    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18978        let mut __tmp = BytesMut::new(bytes);
18979        #[allow(clippy::absurd_extreme_comparisons)]
18980        #[allow(unused_comparisons)]
18981        if __tmp.remaining() < Self::ENCODED_LEN {
18982            panic!(
18983                "buffer is too small (need {} bytes, but got {})",
18984                Self::ENCODED_LEN,
18985                __tmp.remaining(),
18986            )
18987        }
18988        __tmp.put_u64_le(self.time_usec);
18989        __tmp.put_f32_le(self.xacc);
18990        __tmp.put_f32_le(self.yacc);
18991        __tmp.put_f32_le(self.zacc);
18992        __tmp.put_f32_le(self.xgyro);
18993        __tmp.put_f32_le(self.ygyro);
18994        __tmp.put_f32_le(self.zgyro);
18995        __tmp.put_f32_le(self.xmag);
18996        __tmp.put_f32_le(self.ymag);
18997        __tmp.put_f32_le(self.zmag);
18998        __tmp.put_f32_le(self.abs_pressure);
18999        __tmp.put_f32_le(self.diff_pressure);
19000        __tmp.put_f32_le(self.pressure_alt);
19001        __tmp.put_f32_le(self.temperature);
19002        __tmp.put_u32_le(self.fields_updated.bits() as u32);
19003        if matches!(version, MavlinkVersion::V2) {
19004            __tmp.put_u8(self.id);
19005            let len = __tmp.len();
19006            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19007        } else {
19008            __tmp.len()
19009        }
19010    }
19011}
19012#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
19013#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
19014#[doc = ""]
19015#[doc = "ID: 90"]
19016#[derive(Debug, Clone, PartialEq)]
19017#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19018#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19019#[cfg_attr(feature = "ts", derive(TS))]
19020#[cfg_attr(feature = "ts", ts(export))]
19021pub struct HIL_STATE_DATA {
19022    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
19023    pub time_usec: u64,
19024    #[doc = "Roll angle"]
19025    pub roll: f32,
19026    #[doc = "Pitch angle"]
19027    pub pitch: f32,
19028    #[doc = "Yaw angle"]
19029    pub yaw: f32,
19030    #[doc = "Body frame roll / phi angular speed"]
19031    pub rollspeed: f32,
19032    #[doc = "Body frame pitch / theta angular speed"]
19033    pub pitchspeed: f32,
19034    #[doc = "Body frame yaw / psi angular speed"]
19035    pub yawspeed: f32,
19036    #[doc = "Latitude"]
19037    pub lat: i32,
19038    #[doc = "Longitude"]
19039    pub lon: i32,
19040    #[doc = "Altitude"]
19041    pub alt: i32,
19042    #[doc = "Ground X Speed (Latitude)"]
19043    pub vx: i16,
19044    #[doc = "Ground Y Speed (Longitude)"]
19045    pub vy: i16,
19046    #[doc = "Ground Z Speed (Altitude)"]
19047    pub vz: i16,
19048    #[doc = "X acceleration"]
19049    pub xacc: i16,
19050    #[doc = "Y acceleration"]
19051    pub yacc: i16,
19052    #[doc = "Z acceleration"]
19053    pub zacc: i16,
19054}
19055impl HIL_STATE_DATA {
19056    pub const ENCODED_LEN: usize = 56usize;
19057    pub const DEFAULT: Self = Self {
19058        time_usec: 0_u64,
19059        roll: 0.0_f32,
19060        pitch: 0.0_f32,
19061        yaw: 0.0_f32,
19062        rollspeed: 0.0_f32,
19063        pitchspeed: 0.0_f32,
19064        yawspeed: 0.0_f32,
19065        lat: 0_i32,
19066        lon: 0_i32,
19067        alt: 0_i32,
19068        vx: 0_i16,
19069        vy: 0_i16,
19070        vz: 0_i16,
19071        xacc: 0_i16,
19072        yacc: 0_i16,
19073        zacc: 0_i16,
19074    };
19075    #[cfg(feature = "arbitrary")]
19076    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19077        use arbitrary::{Arbitrary, Unstructured};
19078        let mut buf = [0u8; 1024];
19079        rng.fill_bytes(&mut buf);
19080        let mut unstructured = Unstructured::new(&buf);
19081        Self::arbitrary(&mut unstructured).unwrap_or_default()
19082    }
19083}
19084impl Default for HIL_STATE_DATA {
19085    fn default() -> Self {
19086        Self::DEFAULT.clone()
19087    }
19088}
19089impl MessageData for HIL_STATE_DATA {
19090    type Message = MavMessage;
19091    const ID: u32 = 90u32;
19092    const NAME: &'static str = "HIL_STATE";
19093    const EXTRA_CRC: u8 = 183u8;
19094    const ENCODED_LEN: usize = 56usize;
19095    fn deser(
19096        _version: MavlinkVersion,
19097        __input: &[u8],
19098    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19099        let avail_len = __input.len();
19100        let mut payload_buf = [0; Self::ENCODED_LEN];
19101        let mut buf = if avail_len < Self::ENCODED_LEN {
19102            payload_buf[0..avail_len].copy_from_slice(__input);
19103            Bytes::new(&payload_buf)
19104        } else {
19105            Bytes::new(__input)
19106        };
19107        let mut __struct = Self::default();
19108        __struct.time_usec = buf.get_u64_le()?;
19109        __struct.roll = buf.get_f32_le()?;
19110        __struct.pitch = buf.get_f32_le()?;
19111        __struct.yaw = buf.get_f32_le()?;
19112        __struct.rollspeed = buf.get_f32_le()?;
19113        __struct.pitchspeed = buf.get_f32_le()?;
19114        __struct.yawspeed = buf.get_f32_le()?;
19115        __struct.lat = buf.get_i32_le()?;
19116        __struct.lon = buf.get_i32_le()?;
19117        __struct.alt = buf.get_i32_le()?;
19118        __struct.vx = buf.get_i16_le()?;
19119        __struct.vy = buf.get_i16_le()?;
19120        __struct.vz = buf.get_i16_le()?;
19121        __struct.xacc = buf.get_i16_le()?;
19122        __struct.yacc = buf.get_i16_le()?;
19123        __struct.zacc = buf.get_i16_le()?;
19124        Ok(__struct)
19125    }
19126    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19127        let mut __tmp = BytesMut::new(bytes);
19128        #[allow(clippy::absurd_extreme_comparisons)]
19129        #[allow(unused_comparisons)]
19130        if __tmp.remaining() < Self::ENCODED_LEN {
19131            panic!(
19132                "buffer is too small (need {} bytes, but got {})",
19133                Self::ENCODED_LEN,
19134                __tmp.remaining(),
19135            )
19136        }
19137        __tmp.put_u64_le(self.time_usec);
19138        __tmp.put_f32_le(self.roll);
19139        __tmp.put_f32_le(self.pitch);
19140        __tmp.put_f32_le(self.yaw);
19141        __tmp.put_f32_le(self.rollspeed);
19142        __tmp.put_f32_le(self.pitchspeed);
19143        __tmp.put_f32_le(self.yawspeed);
19144        __tmp.put_i32_le(self.lat);
19145        __tmp.put_i32_le(self.lon);
19146        __tmp.put_i32_le(self.alt);
19147        __tmp.put_i16_le(self.vx);
19148        __tmp.put_i16_le(self.vy);
19149        __tmp.put_i16_le(self.vz);
19150        __tmp.put_i16_le(self.xacc);
19151        __tmp.put_i16_le(self.yacc);
19152        __tmp.put_i16_le(self.zacc);
19153        if matches!(version, MavlinkVersion::V2) {
19154            let len = __tmp.len();
19155            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19156        } else {
19157            __tmp.len()
19158        }
19159    }
19160}
19161#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
19162#[doc = ""]
19163#[doc = "ID: 115"]
19164#[derive(Debug, Clone, PartialEq)]
19165#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19166#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19167#[cfg_attr(feature = "ts", derive(TS))]
19168#[cfg_attr(feature = "ts", ts(export))]
19169pub struct HIL_STATE_QUATERNION_DATA {
19170    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
19171    pub time_usec: u64,
19172    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
19173    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19174    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19175    pub attitude_quaternion: [f32; 4],
19176    #[doc = "Body frame roll / phi angular speed"]
19177    pub rollspeed: f32,
19178    #[doc = "Body frame pitch / theta angular speed"]
19179    pub pitchspeed: f32,
19180    #[doc = "Body frame yaw / psi angular speed"]
19181    pub yawspeed: f32,
19182    #[doc = "Latitude"]
19183    pub lat: i32,
19184    #[doc = "Longitude"]
19185    pub lon: i32,
19186    #[doc = "Altitude"]
19187    pub alt: i32,
19188    #[doc = "Ground X Speed (Latitude)"]
19189    pub vx: i16,
19190    #[doc = "Ground Y Speed (Longitude)"]
19191    pub vy: i16,
19192    #[doc = "Ground Z Speed (Altitude)"]
19193    pub vz: i16,
19194    #[doc = "Indicated airspeed"]
19195    pub ind_airspeed: u16,
19196    #[doc = "True airspeed"]
19197    pub true_airspeed: u16,
19198    #[doc = "X acceleration"]
19199    pub xacc: i16,
19200    #[doc = "Y acceleration"]
19201    pub yacc: i16,
19202    #[doc = "Z acceleration"]
19203    pub zacc: i16,
19204}
19205impl HIL_STATE_QUATERNION_DATA {
19206    pub const ENCODED_LEN: usize = 64usize;
19207    pub const DEFAULT: Self = Self {
19208        time_usec: 0_u64,
19209        attitude_quaternion: [0.0_f32; 4usize],
19210        rollspeed: 0.0_f32,
19211        pitchspeed: 0.0_f32,
19212        yawspeed: 0.0_f32,
19213        lat: 0_i32,
19214        lon: 0_i32,
19215        alt: 0_i32,
19216        vx: 0_i16,
19217        vy: 0_i16,
19218        vz: 0_i16,
19219        ind_airspeed: 0_u16,
19220        true_airspeed: 0_u16,
19221        xacc: 0_i16,
19222        yacc: 0_i16,
19223        zacc: 0_i16,
19224    };
19225    #[cfg(feature = "arbitrary")]
19226    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19227        use arbitrary::{Arbitrary, Unstructured};
19228        let mut buf = [0u8; 1024];
19229        rng.fill_bytes(&mut buf);
19230        let mut unstructured = Unstructured::new(&buf);
19231        Self::arbitrary(&mut unstructured).unwrap_or_default()
19232    }
19233}
19234impl Default for HIL_STATE_QUATERNION_DATA {
19235    fn default() -> Self {
19236        Self::DEFAULT.clone()
19237    }
19238}
19239impl MessageData for HIL_STATE_QUATERNION_DATA {
19240    type Message = MavMessage;
19241    const ID: u32 = 115u32;
19242    const NAME: &'static str = "HIL_STATE_QUATERNION";
19243    const EXTRA_CRC: u8 = 4u8;
19244    const ENCODED_LEN: usize = 64usize;
19245    fn deser(
19246        _version: MavlinkVersion,
19247        __input: &[u8],
19248    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19249        let avail_len = __input.len();
19250        let mut payload_buf = [0; Self::ENCODED_LEN];
19251        let mut buf = if avail_len < Self::ENCODED_LEN {
19252            payload_buf[0..avail_len].copy_from_slice(__input);
19253            Bytes::new(&payload_buf)
19254        } else {
19255            Bytes::new(__input)
19256        };
19257        let mut __struct = Self::default();
19258        __struct.time_usec = buf.get_u64_le()?;
19259        for v in &mut __struct.attitude_quaternion {
19260            let val = buf.get_f32_le()?;
19261            *v = val;
19262        }
19263        __struct.rollspeed = buf.get_f32_le()?;
19264        __struct.pitchspeed = buf.get_f32_le()?;
19265        __struct.yawspeed = buf.get_f32_le()?;
19266        __struct.lat = buf.get_i32_le()?;
19267        __struct.lon = buf.get_i32_le()?;
19268        __struct.alt = buf.get_i32_le()?;
19269        __struct.vx = buf.get_i16_le()?;
19270        __struct.vy = buf.get_i16_le()?;
19271        __struct.vz = buf.get_i16_le()?;
19272        __struct.ind_airspeed = buf.get_u16_le()?;
19273        __struct.true_airspeed = buf.get_u16_le()?;
19274        __struct.xacc = buf.get_i16_le()?;
19275        __struct.yacc = buf.get_i16_le()?;
19276        __struct.zacc = buf.get_i16_le()?;
19277        Ok(__struct)
19278    }
19279    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19280        let mut __tmp = BytesMut::new(bytes);
19281        #[allow(clippy::absurd_extreme_comparisons)]
19282        #[allow(unused_comparisons)]
19283        if __tmp.remaining() < Self::ENCODED_LEN {
19284            panic!(
19285                "buffer is too small (need {} bytes, but got {})",
19286                Self::ENCODED_LEN,
19287                __tmp.remaining(),
19288            )
19289        }
19290        __tmp.put_u64_le(self.time_usec);
19291        for val in &self.attitude_quaternion {
19292            __tmp.put_f32_le(*val);
19293        }
19294        __tmp.put_f32_le(self.rollspeed);
19295        __tmp.put_f32_le(self.pitchspeed);
19296        __tmp.put_f32_le(self.yawspeed);
19297        __tmp.put_i32_le(self.lat);
19298        __tmp.put_i32_le(self.lon);
19299        __tmp.put_i32_le(self.alt);
19300        __tmp.put_i16_le(self.vx);
19301        __tmp.put_i16_le(self.vy);
19302        __tmp.put_i16_le(self.vz);
19303        __tmp.put_u16_le(self.ind_airspeed);
19304        __tmp.put_u16_le(self.true_airspeed);
19305        __tmp.put_i16_le(self.xacc);
19306        __tmp.put_i16_le(self.yacc);
19307        __tmp.put_i16_le(self.zacc);
19308        if matches!(version, MavlinkVersion::V2) {
19309            let len = __tmp.len();
19310            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19311        } else {
19312            __tmp.len()
19313        }
19314    }
19315}
19316#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
19317#[doc = ""]
19318#[doc = "ID: 242"]
19319#[derive(Debug, Clone, PartialEq)]
19320#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19321#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19322#[cfg_attr(feature = "ts", derive(TS))]
19323#[cfg_attr(feature = "ts", ts(export))]
19324pub struct HOME_POSITION_DATA {
19325    #[doc = "Latitude (WGS84)"]
19326    pub latitude: i32,
19327    #[doc = "Longitude (WGS84)"]
19328    pub longitude: i32,
19329    #[doc = "Altitude (MSL). Positive for up."]
19330    pub altitude: i32,
19331    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
19332    pub x: f32,
19333    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
19334    pub y: f32,
19335    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
19336    pub z: f32,
19337    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
19338    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19339    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19340    pub q: [f32; 4],
19341    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
19342    pub approach_x: f32,
19343    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
19344    pub approach_y: f32,
19345    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
19346    pub approach_z: f32,
19347    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
19348    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19349    pub time_usec: u64,
19350}
19351impl HOME_POSITION_DATA {
19352    pub const ENCODED_LEN: usize = 60usize;
19353    pub const DEFAULT: Self = Self {
19354        latitude: 0_i32,
19355        longitude: 0_i32,
19356        altitude: 0_i32,
19357        x: 0.0_f32,
19358        y: 0.0_f32,
19359        z: 0.0_f32,
19360        q: [0.0_f32; 4usize],
19361        approach_x: 0.0_f32,
19362        approach_y: 0.0_f32,
19363        approach_z: 0.0_f32,
19364        time_usec: 0_u64,
19365    };
19366    #[cfg(feature = "arbitrary")]
19367    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19368        use arbitrary::{Arbitrary, Unstructured};
19369        let mut buf = [0u8; 1024];
19370        rng.fill_bytes(&mut buf);
19371        let mut unstructured = Unstructured::new(&buf);
19372        Self::arbitrary(&mut unstructured).unwrap_or_default()
19373    }
19374}
19375impl Default for HOME_POSITION_DATA {
19376    fn default() -> Self {
19377        Self::DEFAULT.clone()
19378    }
19379}
19380impl MessageData for HOME_POSITION_DATA {
19381    type Message = MavMessage;
19382    const ID: u32 = 242u32;
19383    const NAME: &'static str = "HOME_POSITION";
19384    const EXTRA_CRC: u8 = 104u8;
19385    const ENCODED_LEN: usize = 60usize;
19386    fn deser(
19387        _version: MavlinkVersion,
19388        __input: &[u8],
19389    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19390        let avail_len = __input.len();
19391        let mut payload_buf = [0; Self::ENCODED_LEN];
19392        let mut buf = if avail_len < Self::ENCODED_LEN {
19393            payload_buf[0..avail_len].copy_from_slice(__input);
19394            Bytes::new(&payload_buf)
19395        } else {
19396            Bytes::new(__input)
19397        };
19398        let mut __struct = Self::default();
19399        __struct.latitude = buf.get_i32_le()?;
19400        __struct.longitude = buf.get_i32_le()?;
19401        __struct.altitude = buf.get_i32_le()?;
19402        __struct.x = buf.get_f32_le()?;
19403        __struct.y = buf.get_f32_le()?;
19404        __struct.z = buf.get_f32_le()?;
19405        for v in &mut __struct.q {
19406            let val = buf.get_f32_le()?;
19407            *v = val;
19408        }
19409        __struct.approach_x = buf.get_f32_le()?;
19410        __struct.approach_y = buf.get_f32_le()?;
19411        __struct.approach_z = buf.get_f32_le()?;
19412        __struct.time_usec = buf.get_u64_le()?;
19413        Ok(__struct)
19414    }
19415    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19416        let mut __tmp = BytesMut::new(bytes);
19417        #[allow(clippy::absurd_extreme_comparisons)]
19418        #[allow(unused_comparisons)]
19419        if __tmp.remaining() < Self::ENCODED_LEN {
19420            panic!(
19421                "buffer is too small (need {} bytes, but got {})",
19422                Self::ENCODED_LEN,
19423                __tmp.remaining(),
19424            )
19425        }
19426        __tmp.put_i32_le(self.latitude);
19427        __tmp.put_i32_le(self.longitude);
19428        __tmp.put_i32_le(self.altitude);
19429        __tmp.put_f32_le(self.x);
19430        __tmp.put_f32_le(self.y);
19431        __tmp.put_f32_le(self.z);
19432        for val in &self.q {
19433            __tmp.put_f32_le(*val);
19434        }
19435        __tmp.put_f32_le(self.approach_x);
19436        __tmp.put_f32_le(self.approach_y);
19437        __tmp.put_f32_le(self.approach_z);
19438        if matches!(version, MavlinkVersion::V2) {
19439            __tmp.put_u64_le(self.time_usec);
19440            let len = __tmp.len();
19441            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19442        } else {
19443            __tmp.len()
19444        }
19445    }
19446}
19447#[doc = "Temperature and humidity from hygrometer."]
19448#[doc = ""]
19449#[doc = "ID: 12920"]
19450#[derive(Debug, Clone, PartialEq)]
19451#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19452#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19453#[cfg_attr(feature = "ts", derive(TS))]
19454#[cfg_attr(feature = "ts", ts(export))]
19455pub struct HYGROMETER_SENSOR_DATA {
19456    #[doc = "Temperature"]
19457    pub temperature: i16,
19458    #[doc = "Humidity"]
19459    pub humidity: u16,
19460    #[doc = "Hygrometer ID"]
19461    pub id: u8,
19462}
19463impl HYGROMETER_SENSOR_DATA {
19464    pub const ENCODED_LEN: usize = 5usize;
19465    pub const DEFAULT: Self = Self {
19466        temperature: 0_i16,
19467        humidity: 0_u16,
19468        id: 0_u8,
19469    };
19470    #[cfg(feature = "arbitrary")]
19471    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19472        use arbitrary::{Arbitrary, Unstructured};
19473        let mut buf = [0u8; 1024];
19474        rng.fill_bytes(&mut buf);
19475        let mut unstructured = Unstructured::new(&buf);
19476        Self::arbitrary(&mut unstructured).unwrap_or_default()
19477    }
19478}
19479impl Default for HYGROMETER_SENSOR_DATA {
19480    fn default() -> Self {
19481        Self::DEFAULT.clone()
19482    }
19483}
19484impl MessageData for HYGROMETER_SENSOR_DATA {
19485    type Message = MavMessage;
19486    const ID: u32 = 12920u32;
19487    const NAME: &'static str = "HYGROMETER_SENSOR";
19488    const EXTRA_CRC: u8 = 20u8;
19489    const ENCODED_LEN: usize = 5usize;
19490    fn deser(
19491        _version: MavlinkVersion,
19492        __input: &[u8],
19493    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19494        let avail_len = __input.len();
19495        let mut payload_buf = [0; Self::ENCODED_LEN];
19496        let mut buf = if avail_len < Self::ENCODED_LEN {
19497            payload_buf[0..avail_len].copy_from_slice(__input);
19498            Bytes::new(&payload_buf)
19499        } else {
19500            Bytes::new(__input)
19501        };
19502        let mut __struct = Self::default();
19503        __struct.temperature = buf.get_i16_le()?;
19504        __struct.humidity = buf.get_u16_le()?;
19505        __struct.id = buf.get_u8()?;
19506        Ok(__struct)
19507    }
19508    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19509        let mut __tmp = BytesMut::new(bytes);
19510        #[allow(clippy::absurd_extreme_comparisons)]
19511        #[allow(unused_comparisons)]
19512        if __tmp.remaining() < Self::ENCODED_LEN {
19513            panic!(
19514                "buffer is too small (need {} bytes, but got {})",
19515                Self::ENCODED_LEN,
19516                __tmp.remaining(),
19517            )
19518        }
19519        __tmp.put_i16_le(self.temperature);
19520        __tmp.put_u16_le(self.humidity);
19521        __tmp.put_u8(self.id);
19522        if matches!(version, MavlinkVersion::V2) {
19523            let len = __tmp.len();
19524            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19525        } else {
19526            __tmp.len()
19527        }
19528    }
19529}
19530#[doc = "Illuminator status."]
19531#[doc = ""]
19532#[doc = "ID: 440"]
19533#[derive(Debug, Clone, PartialEq)]
19534#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19535#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19536#[cfg_attr(feature = "ts", derive(TS))]
19537#[cfg_attr(feature = "ts", ts(export))]
19538pub struct ILLUMINATOR_STATUS_DATA {
19539    #[doc = "Time since the start-up of the illuminator in ms"]
19540    pub uptime_ms: u32,
19541    #[doc = "Errors"]
19542    pub error_status: IlluminatorErrorFlags,
19543    #[doc = "Illuminator brightness"]
19544    pub brightness: f32,
19545    #[doc = "Illuminator strobing period in seconds"]
19546    pub strobe_period: f32,
19547    #[doc = "Illuminator strobing duty cycle"]
19548    pub strobe_duty_cycle: f32,
19549    #[doc = "Temperature in Celsius"]
19550    pub temp_c: f32,
19551    #[doc = "Minimum strobing period in seconds"]
19552    pub min_strobe_period: f32,
19553    #[doc = "Maximum strobing period in seconds"]
19554    pub max_strobe_period: f32,
19555    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
19556    pub enable: u8,
19557    #[doc = "Supported illuminator modes"]
19558    pub mode_bitmask: IlluminatorMode,
19559    #[doc = "Illuminator mode"]
19560    pub mode: IlluminatorMode,
19561}
19562impl ILLUMINATOR_STATUS_DATA {
19563    pub const ENCODED_LEN: usize = 35usize;
19564    pub const DEFAULT: Self = Self {
19565        uptime_ms: 0_u32,
19566        error_status: IlluminatorErrorFlags::DEFAULT,
19567        brightness: 0.0_f32,
19568        strobe_period: 0.0_f32,
19569        strobe_duty_cycle: 0.0_f32,
19570        temp_c: 0.0_f32,
19571        min_strobe_period: 0.0_f32,
19572        max_strobe_period: 0.0_f32,
19573        enable: 0_u8,
19574        mode_bitmask: IlluminatorMode::DEFAULT,
19575        mode: IlluminatorMode::DEFAULT,
19576    };
19577    #[cfg(feature = "arbitrary")]
19578    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19579        use arbitrary::{Arbitrary, Unstructured};
19580        let mut buf = [0u8; 1024];
19581        rng.fill_bytes(&mut buf);
19582        let mut unstructured = Unstructured::new(&buf);
19583        Self::arbitrary(&mut unstructured).unwrap_or_default()
19584    }
19585}
19586impl Default for ILLUMINATOR_STATUS_DATA {
19587    fn default() -> Self {
19588        Self::DEFAULT.clone()
19589    }
19590}
19591impl MessageData for ILLUMINATOR_STATUS_DATA {
19592    type Message = MavMessage;
19593    const ID: u32 = 440u32;
19594    const NAME: &'static str = "ILLUMINATOR_STATUS";
19595    const EXTRA_CRC: u8 = 66u8;
19596    const ENCODED_LEN: usize = 35usize;
19597    fn deser(
19598        _version: MavlinkVersion,
19599        __input: &[u8],
19600    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19601        let avail_len = __input.len();
19602        let mut payload_buf = [0; Self::ENCODED_LEN];
19603        let mut buf = if avail_len < Self::ENCODED_LEN {
19604            payload_buf[0..avail_len].copy_from_slice(__input);
19605            Bytes::new(&payload_buf)
19606        } else {
19607            Bytes::new(__input)
19608        };
19609        let mut __struct = Self::default();
19610        __struct.uptime_ms = buf.get_u32_le()?;
19611        let tmp = buf.get_u32_le()?;
19612        __struct.error_status = IlluminatorErrorFlags::from_bits(
19613            tmp as <IlluminatorErrorFlags as Flags>::Bits,
19614        )
19615        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
19616            flag_type: "IlluminatorErrorFlags",
19617            value: tmp as u64,
19618        })?;
19619        __struct.brightness = buf.get_f32_le()?;
19620        __struct.strobe_period = buf.get_f32_le()?;
19621        __struct.strobe_duty_cycle = buf.get_f32_le()?;
19622        __struct.temp_c = buf.get_f32_le()?;
19623        __struct.min_strobe_period = buf.get_f32_le()?;
19624        __struct.max_strobe_period = buf.get_f32_le()?;
19625        __struct.enable = buf.get_u8()?;
19626        let tmp = buf.get_u8()?;
19627        __struct.mode_bitmask =
19628            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19629                enum_type: "IlluminatorMode",
19630                value: tmp as u64,
19631            })?;
19632        let tmp = buf.get_u8()?;
19633        __struct.mode =
19634            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19635                enum_type: "IlluminatorMode",
19636                value: tmp as u64,
19637            })?;
19638        Ok(__struct)
19639    }
19640    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19641        let mut __tmp = BytesMut::new(bytes);
19642        #[allow(clippy::absurd_extreme_comparisons)]
19643        #[allow(unused_comparisons)]
19644        if __tmp.remaining() < Self::ENCODED_LEN {
19645            panic!(
19646                "buffer is too small (need {} bytes, but got {})",
19647                Self::ENCODED_LEN,
19648                __tmp.remaining(),
19649            )
19650        }
19651        __tmp.put_u32_le(self.uptime_ms);
19652        __tmp.put_u32_le(self.error_status.bits() as u32);
19653        __tmp.put_f32_le(self.brightness);
19654        __tmp.put_f32_le(self.strobe_period);
19655        __tmp.put_f32_le(self.strobe_duty_cycle);
19656        __tmp.put_f32_le(self.temp_c);
19657        __tmp.put_f32_le(self.min_strobe_period);
19658        __tmp.put_f32_le(self.max_strobe_period);
19659        __tmp.put_u8(self.enable);
19660        __tmp.put_u8(self.mode_bitmask as u8);
19661        __tmp.put_u8(self.mode as u8);
19662        if matches!(version, MavlinkVersion::V2) {
19663            let len = __tmp.len();
19664            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19665        } else {
19666            __tmp.len()
19667        }
19668    }
19669}
19670#[doc = "Status of the Iridium SBD link."]
19671#[doc = ""]
19672#[doc = "ID: 335"]
19673#[derive(Debug, Clone, PartialEq)]
19674#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19675#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19676#[cfg_attr(feature = "ts", derive(TS))]
19677#[cfg_attr(feature = "ts", ts(export))]
19678pub struct ISBD_LINK_STATUS_DATA {
19679    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
19680    pub timestamp: u64,
19681    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
19682    pub last_heartbeat: u64,
19683    #[doc = "Number of failed SBD sessions."]
19684    pub failed_sessions: u16,
19685    #[doc = "Number of successful SBD sessions."]
19686    pub successful_sessions: u16,
19687    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
19688    pub signal_quality: u8,
19689    #[doc = "1: Ring call pending, 0: No call pending."]
19690    pub ring_pending: u8,
19691    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
19692    pub tx_session_pending: u8,
19693    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
19694    pub rx_session_pending: u8,
19695}
19696impl ISBD_LINK_STATUS_DATA {
19697    pub const ENCODED_LEN: usize = 24usize;
19698    pub const DEFAULT: Self = Self {
19699        timestamp: 0_u64,
19700        last_heartbeat: 0_u64,
19701        failed_sessions: 0_u16,
19702        successful_sessions: 0_u16,
19703        signal_quality: 0_u8,
19704        ring_pending: 0_u8,
19705        tx_session_pending: 0_u8,
19706        rx_session_pending: 0_u8,
19707    };
19708    #[cfg(feature = "arbitrary")]
19709    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19710        use arbitrary::{Arbitrary, Unstructured};
19711        let mut buf = [0u8; 1024];
19712        rng.fill_bytes(&mut buf);
19713        let mut unstructured = Unstructured::new(&buf);
19714        Self::arbitrary(&mut unstructured).unwrap_or_default()
19715    }
19716}
19717impl Default for ISBD_LINK_STATUS_DATA {
19718    fn default() -> Self {
19719        Self::DEFAULT.clone()
19720    }
19721}
19722impl MessageData for ISBD_LINK_STATUS_DATA {
19723    type Message = MavMessage;
19724    const ID: u32 = 335u32;
19725    const NAME: &'static str = "ISBD_LINK_STATUS";
19726    const EXTRA_CRC: u8 = 225u8;
19727    const ENCODED_LEN: usize = 24usize;
19728    fn deser(
19729        _version: MavlinkVersion,
19730        __input: &[u8],
19731    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19732        let avail_len = __input.len();
19733        let mut payload_buf = [0; Self::ENCODED_LEN];
19734        let mut buf = if avail_len < Self::ENCODED_LEN {
19735            payload_buf[0..avail_len].copy_from_slice(__input);
19736            Bytes::new(&payload_buf)
19737        } else {
19738            Bytes::new(__input)
19739        };
19740        let mut __struct = Self::default();
19741        __struct.timestamp = buf.get_u64_le()?;
19742        __struct.last_heartbeat = buf.get_u64_le()?;
19743        __struct.failed_sessions = buf.get_u16_le()?;
19744        __struct.successful_sessions = buf.get_u16_le()?;
19745        __struct.signal_quality = buf.get_u8()?;
19746        __struct.ring_pending = buf.get_u8()?;
19747        __struct.tx_session_pending = buf.get_u8()?;
19748        __struct.rx_session_pending = buf.get_u8()?;
19749        Ok(__struct)
19750    }
19751    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19752        let mut __tmp = BytesMut::new(bytes);
19753        #[allow(clippy::absurd_extreme_comparisons)]
19754        #[allow(unused_comparisons)]
19755        if __tmp.remaining() < Self::ENCODED_LEN {
19756            panic!(
19757                "buffer is too small (need {} bytes, but got {})",
19758                Self::ENCODED_LEN,
19759                __tmp.remaining(),
19760            )
19761        }
19762        __tmp.put_u64_le(self.timestamp);
19763        __tmp.put_u64_le(self.last_heartbeat);
19764        __tmp.put_u16_le(self.failed_sessions);
19765        __tmp.put_u16_le(self.successful_sessions);
19766        __tmp.put_u8(self.signal_quality);
19767        __tmp.put_u8(self.ring_pending);
19768        __tmp.put_u8(self.tx_session_pending);
19769        __tmp.put_u8(self.rx_session_pending);
19770        if matches!(version, MavlinkVersion::V2) {
19771            let len = __tmp.len();
19772            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19773        } else {
19774            __tmp.len()
19775        }
19776    }
19777}
19778#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
19779#[doc = ""]
19780#[doc = "ID: 149"]
19781#[derive(Debug, Clone, PartialEq)]
19782#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19783#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19784#[cfg_attr(feature = "ts", derive(TS))]
19785#[cfg_attr(feature = "ts", ts(export))]
19786pub struct LANDING_TARGET_DATA {
19787    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
19788    pub time_usec: u64,
19789    #[doc = "X-axis angular offset of the target from the center of the image"]
19790    pub angle_x: f32,
19791    #[doc = "Y-axis angular offset of the target from the center of the image"]
19792    pub angle_y: f32,
19793    #[doc = "Distance to the target from the vehicle"]
19794    pub distance: f32,
19795    #[doc = "Size of target along x-axis"]
19796    pub size_x: f32,
19797    #[doc = "Size of target along y-axis"]
19798    pub size_y: f32,
19799    #[doc = "The ID of the target if multiple targets are present"]
19800    pub target_num: u8,
19801    #[doc = "Coordinate frame used for following fields."]
19802    pub frame: MavFrame,
19803    #[doc = "X Position of the landing target in MAV_FRAME"]
19804    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19805    pub x: f32,
19806    #[doc = "Y Position of the landing target in MAV_FRAME"]
19807    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19808    pub y: f32,
19809    #[doc = "Z Position of the landing target in MAV_FRAME"]
19810    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19811    pub z: f32,
19812    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
19813    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19814    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19815    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19816    pub q: [f32; 4],
19817    #[doc = "Type of landing target"]
19818    #[cfg_attr(feature = "serde", serde(default))]
19819    pub mavtype: LandingTargetType,
19820    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
19821    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19822    pub position_valid: u8,
19823}
19824impl LANDING_TARGET_DATA {
19825    pub const ENCODED_LEN: usize = 60usize;
19826    pub const DEFAULT: Self = Self {
19827        time_usec: 0_u64,
19828        angle_x: 0.0_f32,
19829        angle_y: 0.0_f32,
19830        distance: 0.0_f32,
19831        size_x: 0.0_f32,
19832        size_y: 0.0_f32,
19833        target_num: 0_u8,
19834        frame: MavFrame::DEFAULT,
19835        x: 0.0_f32,
19836        y: 0.0_f32,
19837        z: 0.0_f32,
19838        q: [0.0_f32; 4usize],
19839        mavtype: LandingTargetType::DEFAULT,
19840        position_valid: 0_u8,
19841    };
19842    #[cfg(feature = "arbitrary")]
19843    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19844        use arbitrary::{Arbitrary, Unstructured};
19845        let mut buf = [0u8; 1024];
19846        rng.fill_bytes(&mut buf);
19847        let mut unstructured = Unstructured::new(&buf);
19848        Self::arbitrary(&mut unstructured).unwrap_or_default()
19849    }
19850}
19851impl Default for LANDING_TARGET_DATA {
19852    fn default() -> Self {
19853        Self::DEFAULT.clone()
19854    }
19855}
19856impl MessageData for LANDING_TARGET_DATA {
19857    type Message = MavMessage;
19858    const ID: u32 = 149u32;
19859    const NAME: &'static str = "LANDING_TARGET";
19860    const EXTRA_CRC: u8 = 200u8;
19861    const ENCODED_LEN: usize = 60usize;
19862    fn deser(
19863        _version: MavlinkVersion,
19864        __input: &[u8],
19865    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19866        let avail_len = __input.len();
19867        let mut payload_buf = [0; Self::ENCODED_LEN];
19868        let mut buf = if avail_len < Self::ENCODED_LEN {
19869            payload_buf[0..avail_len].copy_from_slice(__input);
19870            Bytes::new(&payload_buf)
19871        } else {
19872            Bytes::new(__input)
19873        };
19874        let mut __struct = Self::default();
19875        __struct.time_usec = buf.get_u64_le()?;
19876        __struct.angle_x = buf.get_f32_le()?;
19877        __struct.angle_y = buf.get_f32_le()?;
19878        __struct.distance = buf.get_f32_le()?;
19879        __struct.size_x = buf.get_f32_le()?;
19880        __struct.size_y = buf.get_f32_le()?;
19881        __struct.target_num = buf.get_u8()?;
19882        let tmp = buf.get_u8()?;
19883        __struct.frame =
19884            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19885                enum_type: "MavFrame",
19886                value: tmp as u64,
19887            })?;
19888        __struct.x = buf.get_f32_le()?;
19889        __struct.y = buf.get_f32_le()?;
19890        __struct.z = buf.get_f32_le()?;
19891        for v in &mut __struct.q {
19892            let val = buf.get_f32_le()?;
19893            *v = val;
19894        }
19895        let tmp = buf.get_u8()?;
19896        __struct.mavtype =
19897            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19898                enum_type: "LandingTargetType",
19899                value: tmp as u64,
19900            })?;
19901        __struct.position_valid = buf.get_u8()?;
19902        Ok(__struct)
19903    }
19904    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19905        let mut __tmp = BytesMut::new(bytes);
19906        #[allow(clippy::absurd_extreme_comparisons)]
19907        #[allow(unused_comparisons)]
19908        if __tmp.remaining() < Self::ENCODED_LEN {
19909            panic!(
19910                "buffer is too small (need {} bytes, but got {})",
19911                Self::ENCODED_LEN,
19912                __tmp.remaining(),
19913            )
19914        }
19915        __tmp.put_u64_le(self.time_usec);
19916        __tmp.put_f32_le(self.angle_x);
19917        __tmp.put_f32_le(self.angle_y);
19918        __tmp.put_f32_le(self.distance);
19919        __tmp.put_f32_le(self.size_x);
19920        __tmp.put_f32_le(self.size_y);
19921        __tmp.put_u8(self.target_num);
19922        __tmp.put_u8(self.frame as u8);
19923        if matches!(version, MavlinkVersion::V2) {
19924            __tmp.put_f32_le(self.x);
19925            __tmp.put_f32_le(self.y);
19926            __tmp.put_f32_le(self.z);
19927            for val in &self.q {
19928                __tmp.put_f32_le(*val);
19929            }
19930            __tmp.put_u8(self.mavtype as u8);
19931            __tmp.put_u8(self.position_valid);
19932            let len = __tmp.len();
19933            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19934        } else {
19935            __tmp.len()
19936        }
19937    }
19938}
19939#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
19940#[doc = ""]
19941#[doc = "ID: 8"]
19942#[derive(Debug, Clone, PartialEq)]
19943#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19944#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19945#[cfg_attr(feature = "ts", derive(TS))]
19946#[cfg_attr(feature = "ts", ts(export))]
19947pub struct LINK_NODE_STATUS_DATA {
19948    #[doc = "Timestamp (time since system boot)."]
19949    pub timestamp: u64,
19950    #[doc = "Transmit rate"]
19951    pub tx_rate: u32,
19952    #[doc = "Receive rate"]
19953    pub rx_rate: u32,
19954    #[doc = "Messages sent"]
19955    pub messages_sent: u32,
19956    #[doc = "Messages received (estimated from counting seq)"]
19957    pub messages_received: u32,
19958    #[doc = "Messages lost (estimated from counting seq)"]
19959    pub messages_lost: u32,
19960    #[doc = "Number of bytes that could not be parsed correctly."]
19961    pub rx_parse_err: u16,
19962    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
19963    pub tx_overflows: u16,
19964    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
19965    pub rx_overflows: u16,
19966    #[doc = "Remaining free transmit buffer space"]
19967    pub tx_buf: u8,
19968    #[doc = "Remaining free receive buffer space"]
19969    pub rx_buf: u8,
19970}
19971impl LINK_NODE_STATUS_DATA {
19972    pub const ENCODED_LEN: usize = 36usize;
19973    pub const DEFAULT: Self = Self {
19974        timestamp: 0_u64,
19975        tx_rate: 0_u32,
19976        rx_rate: 0_u32,
19977        messages_sent: 0_u32,
19978        messages_received: 0_u32,
19979        messages_lost: 0_u32,
19980        rx_parse_err: 0_u16,
19981        tx_overflows: 0_u16,
19982        rx_overflows: 0_u16,
19983        tx_buf: 0_u8,
19984        rx_buf: 0_u8,
19985    };
19986    #[cfg(feature = "arbitrary")]
19987    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19988        use arbitrary::{Arbitrary, Unstructured};
19989        let mut buf = [0u8; 1024];
19990        rng.fill_bytes(&mut buf);
19991        let mut unstructured = Unstructured::new(&buf);
19992        Self::arbitrary(&mut unstructured).unwrap_or_default()
19993    }
19994}
19995impl Default for LINK_NODE_STATUS_DATA {
19996    fn default() -> Self {
19997        Self::DEFAULT.clone()
19998    }
19999}
20000impl MessageData for LINK_NODE_STATUS_DATA {
20001    type Message = MavMessage;
20002    const ID: u32 = 8u32;
20003    const NAME: &'static str = "LINK_NODE_STATUS";
20004    const EXTRA_CRC: u8 = 117u8;
20005    const ENCODED_LEN: usize = 36usize;
20006    fn deser(
20007        _version: MavlinkVersion,
20008        __input: &[u8],
20009    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20010        let avail_len = __input.len();
20011        let mut payload_buf = [0; Self::ENCODED_LEN];
20012        let mut buf = if avail_len < Self::ENCODED_LEN {
20013            payload_buf[0..avail_len].copy_from_slice(__input);
20014            Bytes::new(&payload_buf)
20015        } else {
20016            Bytes::new(__input)
20017        };
20018        let mut __struct = Self::default();
20019        __struct.timestamp = buf.get_u64_le()?;
20020        __struct.tx_rate = buf.get_u32_le()?;
20021        __struct.rx_rate = buf.get_u32_le()?;
20022        __struct.messages_sent = buf.get_u32_le()?;
20023        __struct.messages_received = buf.get_u32_le()?;
20024        __struct.messages_lost = buf.get_u32_le()?;
20025        __struct.rx_parse_err = buf.get_u16_le()?;
20026        __struct.tx_overflows = buf.get_u16_le()?;
20027        __struct.rx_overflows = buf.get_u16_le()?;
20028        __struct.tx_buf = buf.get_u8()?;
20029        __struct.rx_buf = buf.get_u8()?;
20030        Ok(__struct)
20031    }
20032    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20033        let mut __tmp = BytesMut::new(bytes);
20034        #[allow(clippy::absurd_extreme_comparisons)]
20035        #[allow(unused_comparisons)]
20036        if __tmp.remaining() < Self::ENCODED_LEN {
20037            panic!(
20038                "buffer is too small (need {} bytes, but got {})",
20039                Self::ENCODED_LEN,
20040                __tmp.remaining(),
20041            )
20042        }
20043        __tmp.put_u64_le(self.timestamp);
20044        __tmp.put_u32_le(self.tx_rate);
20045        __tmp.put_u32_le(self.rx_rate);
20046        __tmp.put_u32_le(self.messages_sent);
20047        __tmp.put_u32_le(self.messages_received);
20048        __tmp.put_u32_le(self.messages_lost);
20049        __tmp.put_u16_le(self.rx_parse_err);
20050        __tmp.put_u16_le(self.tx_overflows);
20051        __tmp.put_u16_le(self.rx_overflows);
20052        __tmp.put_u8(self.tx_buf);
20053        __tmp.put_u8(self.rx_buf);
20054        if matches!(version, MavlinkVersion::V2) {
20055            let len = __tmp.len();
20056            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20057        } else {
20058            __tmp.len()
20059        }
20060    }
20061}
20062#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
20063#[doc = ""]
20064#[doc = "ID: 32"]
20065#[derive(Debug, Clone, PartialEq)]
20066#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20067#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20068#[cfg_attr(feature = "ts", derive(TS))]
20069#[cfg_attr(feature = "ts", ts(export))]
20070pub struct LOCAL_POSITION_NED_DATA {
20071    #[doc = "Timestamp (time since system boot)."]
20072    pub time_boot_ms: u32,
20073    #[doc = "X Position"]
20074    pub x: f32,
20075    #[doc = "Y Position"]
20076    pub y: f32,
20077    #[doc = "Z Position"]
20078    pub z: f32,
20079    #[doc = "X Speed"]
20080    pub vx: f32,
20081    #[doc = "Y Speed"]
20082    pub vy: f32,
20083    #[doc = "Z Speed"]
20084    pub vz: f32,
20085}
20086impl LOCAL_POSITION_NED_DATA {
20087    pub const ENCODED_LEN: usize = 28usize;
20088    pub const DEFAULT: Self = Self {
20089        time_boot_ms: 0_u32,
20090        x: 0.0_f32,
20091        y: 0.0_f32,
20092        z: 0.0_f32,
20093        vx: 0.0_f32,
20094        vy: 0.0_f32,
20095        vz: 0.0_f32,
20096    };
20097    #[cfg(feature = "arbitrary")]
20098    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20099        use arbitrary::{Arbitrary, Unstructured};
20100        let mut buf = [0u8; 1024];
20101        rng.fill_bytes(&mut buf);
20102        let mut unstructured = Unstructured::new(&buf);
20103        Self::arbitrary(&mut unstructured).unwrap_or_default()
20104    }
20105}
20106impl Default for LOCAL_POSITION_NED_DATA {
20107    fn default() -> Self {
20108        Self::DEFAULT.clone()
20109    }
20110}
20111impl MessageData for LOCAL_POSITION_NED_DATA {
20112    type Message = MavMessage;
20113    const ID: u32 = 32u32;
20114    const NAME: &'static str = "LOCAL_POSITION_NED";
20115    const EXTRA_CRC: u8 = 185u8;
20116    const ENCODED_LEN: usize = 28usize;
20117    fn deser(
20118        _version: MavlinkVersion,
20119        __input: &[u8],
20120    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20121        let avail_len = __input.len();
20122        let mut payload_buf = [0; Self::ENCODED_LEN];
20123        let mut buf = if avail_len < Self::ENCODED_LEN {
20124            payload_buf[0..avail_len].copy_from_slice(__input);
20125            Bytes::new(&payload_buf)
20126        } else {
20127            Bytes::new(__input)
20128        };
20129        let mut __struct = Self::default();
20130        __struct.time_boot_ms = buf.get_u32_le()?;
20131        __struct.x = buf.get_f32_le()?;
20132        __struct.y = buf.get_f32_le()?;
20133        __struct.z = buf.get_f32_le()?;
20134        __struct.vx = buf.get_f32_le()?;
20135        __struct.vy = buf.get_f32_le()?;
20136        __struct.vz = buf.get_f32_le()?;
20137        Ok(__struct)
20138    }
20139    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20140        let mut __tmp = BytesMut::new(bytes);
20141        #[allow(clippy::absurd_extreme_comparisons)]
20142        #[allow(unused_comparisons)]
20143        if __tmp.remaining() < Self::ENCODED_LEN {
20144            panic!(
20145                "buffer is too small (need {} bytes, but got {})",
20146                Self::ENCODED_LEN,
20147                __tmp.remaining(),
20148            )
20149        }
20150        __tmp.put_u32_le(self.time_boot_ms);
20151        __tmp.put_f32_le(self.x);
20152        __tmp.put_f32_le(self.y);
20153        __tmp.put_f32_le(self.z);
20154        __tmp.put_f32_le(self.vx);
20155        __tmp.put_f32_le(self.vy);
20156        __tmp.put_f32_le(self.vz);
20157        if matches!(version, MavlinkVersion::V2) {
20158            let len = __tmp.len();
20159            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20160        } else {
20161            __tmp.len()
20162        }
20163    }
20164}
20165#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
20166#[doc = ""]
20167#[doc = "ID: 64"]
20168#[derive(Debug, Clone, PartialEq)]
20169#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20170#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20171#[cfg_attr(feature = "ts", derive(TS))]
20172#[cfg_attr(feature = "ts", ts(export))]
20173pub struct LOCAL_POSITION_NED_COV_DATA {
20174    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20175    pub time_usec: u64,
20176    #[doc = "X Position"]
20177    pub x: f32,
20178    #[doc = "Y Position"]
20179    pub y: f32,
20180    #[doc = "Z Position"]
20181    pub z: f32,
20182    #[doc = "X Speed"]
20183    pub vx: f32,
20184    #[doc = "Y Speed"]
20185    pub vy: f32,
20186    #[doc = "Z Speed"]
20187    pub vz: f32,
20188    #[doc = "X Acceleration"]
20189    pub ax: f32,
20190    #[doc = "Y Acceleration"]
20191    pub ay: f32,
20192    #[doc = "Z Acceleration"]
20193    pub az: f32,
20194    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
20195    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20196    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
20197    pub covariance: [f32; 45],
20198    #[doc = "Class id of the estimator this estimate originated from."]
20199    pub estimator_type: MavEstimatorType,
20200}
20201impl LOCAL_POSITION_NED_COV_DATA {
20202    pub const ENCODED_LEN: usize = 225usize;
20203    pub const DEFAULT: Self = Self {
20204        time_usec: 0_u64,
20205        x: 0.0_f32,
20206        y: 0.0_f32,
20207        z: 0.0_f32,
20208        vx: 0.0_f32,
20209        vy: 0.0_f32,
20210        vz: 0.0_f32,
20211        ax: 0.0_f32,
20212        ay: 0.0_f32,
20213        az: 0.0_f32,
20214        covariance: [0.0_f32; 45usize],
20215        estimator_type: MavEstimatorType::DEFAULT,
20216    };
20217    #[cfg(feature = "arbitrary")]
20218    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20219        use arbitrary::{Arbitrary, Unstructured};
20220        let mut buf = [0u8; 1024];
20221        rng.fill_bytes(&mut buf);
20222        let mut unstructured = Unstructured::new(&buf);
20223        Self::arbitrary(&mut unstructured).unwrap_or_default()
20224    }
20225}
20226impl Default for LOCAL_POSITION_NED_COV_DATA {
20227    fn default() -> Self {
20228        Self::DEFAULT.clone()
20229    }
20230}
20231impl MessageData for LOCAL_POSITION_NED_COV_DATA {
20232    type Message = MavMessage;
20233    const ID: u32 = 64u32;
20234    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
20235    const EXTRA_CRC: u8 = 191u8;
20236    const ENCODED_LEN: usize = 225usize;
20237    fn deser(
20238        _version: MavlinkVersion,
20239        __input: &[u8],
20240    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20241        let avail_len = __input.len();
20242        let mut payload_buf = [0; Self::ENCODED_LEN];
20243        let mut buf = if avail_len < Self::ENCODED_LEN {
20244            payload_buf[0..avail_len].copy_from_slice(__input);
20245            Bytes::new(&payload_buf)
20246        } else {
20247            Bytes::new(__input)
20248        };
20249        let mut __struct = Self::default();
20250        __struct.time_usec = buf.get_u64_le()?;
20251        __struct.x = buf.get_f32_le()?;
20252        __struct.y = buf.get_f32_le()?;
20253        __struct.z = buf.get_f32_le()?;
20254        __struct.vx = buf.get_f32_le()?;
20255        __struct.vy = buf.get_f32_le()?;
20256        __struct.vz = buf.get_f32_le()?;
20257        __struct.ax = buf.get_f32_le()?;
20258        __struct.ay = buf.get_f32_le()?;
20259        __struct.az = buf.get_f32_le()?;
20260        for v in &mut __struct.covariance {
20261            let val = buf.get_f32_le()?;
20262            *v = val;
20263        }
20264        let tmp = buf.get_u8()?;
20265        __struct.estimator_type =
20266            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20267                enum_type: "MavEstimatorType",
20268                value: tmp as u64,
20269            })?;
20270        Ok(__struct)
20271    }
20272    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20273        let mut __tmp = BytesMut::new(bytes);
20274        #[allow(clippy::absurd_extreme_comparisons)]
20275        #[allow(unused_comparisons)]
20276        if __tmp.remaining() < Self::ENCODED_LEN {
20277            panic!(
20278                "buffer is too small (need {} bytes, but got {})",
20279                Self::ENCODED_LEN,
20280                __tmp.remaining(),
20281            )
20282        }
20283        __tmp.put_u64_le(self.time_usec);
20284        __tmp.put_f32_le(self.x);
20285        __tmp.put_f32_le(self.y);
20286        __tmp.put_f32_le(self.z);
20287        __tmp.put_f32_le(self.vx);
20288        __tmp.put_f32_le(self.vy);
20289        __tmp.put_f32_le(self.vz);
20290        __tmp.put_f32_le(self.ax);
20291        __tmp.put_f32_le(self.ay);
20292        __tmp.put_f32_le(self.az);
20293        for val in &self.covariance {
20294            __tmp.put_f32_le(*val);
20295        }
20296        __tmp.put_u8(self.estimator_type as u8);
20297        if matches!(version, MavlinkVersion::V2) {
20298            let len = __tmp.len();
20299            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20300        } else {
20301            __tmp.len()
20302        }
20303    }
20304}
20305#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
20306#[doc = ""]
20307#[doc = "ID: 89"]
20308#[derive(Debug, Clone, PartialEq)]
20309#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20310#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20311#[cfg_attr(feature = "ts", derive(TS))]
20312#[cfg_attr(feature = "ts", ts(export))]
20313pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
20314    #[doc = "Timestamp (time since system boot)."]
20315    pub time_boot_ms: u32,
20316    #[doc = "X Position"]
20317    pub x: f32,
20318    #[doc = "Y Position"]
20319    pub y: f32,
20320    #[doc = "Z Position"]
20321    pub z: f32,
20322    #[doc = "Roll"]
20323    pub roll: f32,
20324    #[doc = "Pitch"]
20325    pub pitch: f32,
20326    #[doc = "Yaw"]
20327    pub yaw: f32,
20328}
20329impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
20330    pub const ENCODED_LEN: usize = 28usize;
20331    pub const DEFAULT: Self = Self {
20332        time_boot_ms: 0_u32,
20333        x: 0.0_f32,
20334        y: 0.0_f32,
20335        z: 0.0_f32,
20336        roll: 0.0_f32,
20337        pitch: 0.0_f32,
20338        yaw: 0.0_f32,
20339    };
20340    #[cfg(feature = "arbitrary")]
20341    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20342        use arbitrary::{Arbitrary, Unstructured};
20343        let mut buf = [0u8; 1024];
20344        rng.fill_bytes(&mut buf);
20345        let mut unstructured = Unstructured::new(&buf);
20346        Self::arbitrary(&mut unstructured).unwrap_or_default()
20347    }
20348}
20349impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
20350    fn default() -> Self {
20351        Self::DEFAULT.clone()
20352    }
20353}
20354impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
20355    type Message = MavMessage;
20356    const ID: u32 = 89u32;
20357    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
20358    const EXTRA_CRC: u8 = 231u8;
20359    const ENCODED_LEN: usize = 28usize;
20360    fn deser(
20361        _version: MavlinkVersion,
20362        __input: &[u8],
20363    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20364        let avail_len = __input.len();
20365        let mut payload_buf = [0; Self::ENCODED_LEN];
20366        let mut buf = if avail_len < Self::ENCODED_LEN {
20367            payload_buf[0..avail_len].copy_from_slice(__input);
20368            Bytes::new(&payload_buf)
20369        } else {
20370            Bytes::new(__input)
20371        };
20372        let mut __struct = Self::default();
20373        __struct.time_boot_ms = buf.get_u32_le()?;
20374        __struct.x = buf.get_f32_le()?;
20375        __struct.y = buf.get_f32_le()?;
20376        __struct.z = buf.get_f32_le()?;
20377        __struct.roll = buf.get_f32_le()?;
20378        __struct.pitch = buf.get_f32_le()?;
20379        __struct.yaw = buf.get_f32_le()?;
20380        Ok(__struct)
20381    }
20382    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20383        let mut __tmp = BytesMut::new(bytes);
20384        #[allow(clippy::absurd_extreme_comparisons)]
20385        #[allow(unused_comparisons)]
20386        if __tmp.remaining() < Self::ENCODED_LEN {
20387            panic!(
20388                "buffer is too small (need {} bytes, but got {})",
20389                Self::ENCODED_LEN,
20390                __tmp.remaining(),
20391            )
20392        }
20393        __tmp.put_u32_le(self.time_boot_ms);
20394        __tmp.put_f32_le(self.x);
20395        __tmp.put_f32_le(self.y);
20396        __tmp.put_f32_le(self.z);
20397        __tmp.put_f32_le(self.roll);
20398        __tmp.put_f32_le(self.pitch);
20399        __tmp.put_f32_le(self.yaw);
20400        if matches!(version, MavlinkVersion::V2) {
20401            let len = __tmp.len();
20402            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20403        } else {
20404            __tmp.len()
20405        }
20406    }
20407}
20408#[doc = "An ack for a LOGGING_DATA_ACKED message."]
20409#[doc = ""]
20410#[doc = "ID: 268"]
20411#[derive(Debug, Clone, PartialEq)]
20412#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20413#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20414#[cfg_attr(feature = "ts", derive(TS))]
20415#[cfg_attr(feature = "ts", ts(export))]
20416pub struct LOGGING_ACK_DATA {
20417    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
20418    pub sequence: u16,
20419    #[doc = "system ID of the target"]
20420    pub target_system: u8,
20421    #[doc = "component ID of the target"]
20422    pub target_component: u8,
20423}
20424impl LOGGING_ACK_DATA {
20425    pub const ENCODED_LEN: usize = 4usize;
20426    pub const DEFAULT: Self = Self {
20427        sequence: 0_u16,
20428        target_system: 0_u8,
20429        target_component: 0_u8,
20430    };
20431    #[cfg(feature = "arbitrary")]
20432    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20433        use arbitrary::{Arbitrary, Unstructured};
20434        let mut buf = [0u8; 1024];
20435        rng.fill_bytes(&mut buf);
20436        let mut unstructured = Unstructured::new(&buf);
20437        Self::arbitrary(&mut unstructured).unwrap_or_default()
20438    }
20439}
20440impl Default for LOGGING_ACK_DATA {
20441    fn default() -> Self {
20442        Self::DEFAULT.clone()
20443    }
20444}
20445impl MessageData for LOGGING_ACK_DATA {
20446    type Message = MavMessage;
20447    const ID: u32 = 268u32;
20448    const NAME: &'static str = "LOGGING_ACK";
20449    const EXTRA_CRC: u8 = 14u8;
20450    const ENCODED_LEN: usize = 4usize;
20451    fn deser(
20452        _version: MavlinkVersion,
20453        __input: &[u8],
20454    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20455        let avail_len = __input.len();
20456        let mut payload_buf = [0; Self::ENCODED_LEN];
20457        let mut buf = if avail_len < Self::ENCODED_LEN {
20458            payload_buf[0..avail_len].copy_from_slice(__input);
20459            Bytes::new(&payload_buf)
20460        } else {
20461            Bytes::new(__input)
20462        };
20463        let mut __struct = Self::default();
20464        __struct.sequence = buf.get_u16_le()?;
20465        __struct.target_system = buf.get_u8()?;
20466        __struct.target_component = buf.get_u8()?;
20467        Ok(__struct)
20468    }
20469    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20470        let mut __tmp = BytesMut::new(bytes);
20471        #[allow(clippy::absurd_extreme_comparisons)]
20472        #[allow(unused_comparisons)]
20473        if __tmp.remaining() < Self::ENCODED_LEN {
20474            panic!(
20475                "buffer is too small (need {} bytes, but got {})",
20476                Self::ENCODED_LEN,
20477                __tmp.remaining(),
20478            )
20479        }
20480        __tmp.put_u16_le(self.sequence);
20481        __tmp.put_u8(self.target_system);
20482        __tmp.put_u8(self.target_component);
20483        if matches!(version, MavlinkVersion::V2) {
20484            let len = __tmp.len();
20485            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20486        } else {
20487            __tmp.len()
20488        }
20489    }
20490}
20491#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
20492#[doc = ""]
20493#[doc = "ID: 266"]
20494#[derive(Debug, Clone, PartialEq)]
20495#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20496#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20497#[cfg_attr(feature = "ts", derive(TS))]
20498#[cfg_attr(feature = "ts", ts(export))]
20499pub struct LOGGING_DATA_DATA {
20500    #[doc = "sequence number (can wrap)"]
20501    pub sequence: u16,
20502    #[doc = "system ID of the target"]
20503    pub target_system: u8,
20504    #[doc = "component ID of the target"]
20505    pub target_component: u8,
20506    #[doc = "data length"]
20507    pub length: u8,
20508    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
20509    pub first_message_offset: u8,
20510    #[doc = "logged data"]
20511    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20512    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
20513    pub data: [u8; 249],
20514}
20515impl LOGGING_DATA_DATA {
20516    pub const ENCODED_LEN: usize = 255usize;
20517    pub const DEFAULT: Self = Self {
20518        sequence: 0_u16,
20519        target_system: 0_u8,
20520        target_component: 0_u8,
20521        length: 0_u8,
20522        first_message_offset: 0_u8,
20523        data: [0_u8; 249usize],
20524    };
20525    #[cfg(feature = "arbitrary")]
20526    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20527        use arbitrary::{Arbitrary, Unstructured};
20528        let mut buf = [0u8; 1024];
20529        rng.fill_bytes(&mut buf);
20530        let mut unstructured = Unstructured::new(&buf);
20531        Self::arbitrary(&mut unstructured).unwrap_or_default()
20532    }
20533}
20534impl Default for LOGGING_DATA_DATA {
20535    fn default() -> Self {
20536        Self::DEFAULT.clone()
20537    }
20538}
20539impl MessageData for LOGGING_DATA_DATA {
20540    type Message = MavMessage;
20541    const ID: u32 = 266u32;
20542    const NAME: &'static str = "LOGGING_DATA";
20543    const EXTRA_CRC: u8 = 193u8;
20544    const ENCODED_LEN: usize = 255usize;
20545    fn deser(
20546        _version: MavlinkVersion,
20547        __input: &[u8],
20548    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20549        let avail_len = __input.len();
20550        let mut payload_buf = [0; Self::ENCODED_LEN];
20551        let mut buf = if avail_len < Self::ENCODED_LEN {
20552            payload_buf[0..avail_len].copy_from_slice(__input);
20553            Bytes::new(&payload_buf)
20554        } else {
20555            Bytes::new(__input)
20556        };
20557        let mut __struct = Self::default();
20558        __struct.sequence = buf.get_u16_le()?;
20559        __struct.target_system = buf.get_u8()?;
20560        __struct.target_component = buf.get_u8()?;
20561        __struct.length = buf.get_u8()?;
20562        __struct.first_message_offset = buf.get_u8()?;
20563        for v in &mut __struct.data {
20564            let val = buf.get_u8()?;
20565            *v = val;
20566        }
20567        Ok(__struct)
20568    }
20569    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20570        let mut __tmp = BytesMut::new(bytes);
20571        #[allow(clippy::absurd_extreme_comparisons)]
20572        #[allow(unused_comparisons)]
20573        if __tmp.remaining() < Self::ENCODED_LEN {
20574            panic!(
20575                "buffer is too small (need {} bytes, but got {})",
20576                Self::ENCODED_LEN,
20577                __tmp.remaining(),
20578            )
20579        }
20580        __tmp.put_u16_le(self.sequence);
20581        __tmp.put_u8(self.target_system);
20582        __tmp.put_u8(self.target_component);
20583        __tmp.put_u8(self.length);
20584        __tmp.put_u8(self.first_message_offset);
20585        for val in &self.data {
20586            __tmp.put_u8(*val);
20587        }
20588        if matches!(version, MavlinkVersion::V2) {
20589            let len = __tmp.len();
20590            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20591        } else {
20592            __tmp.len()
20593        }
20594    }
20595}
20596#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
20597#[doc = ""]
20598#[doc = "ID: 267"]
20599#[derive(Debug, Clone, PartialEq)]
20600#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20601#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20602#[cfg_attr(feature = "ts", derive(TS))]
20603#[cfg_attr(feature = "ts", ts(export))]
20604pub struct LOGGING_DATA_ACKED_DATA {
20605    #[doc = "sequence number (can wrap)"]
20606    pub sequence: u16,
20607    #[doc = "system ID of the target"]
20608    pub target_system: u8,
20609    #[doc = "component ID of the target"]
20610    pub target_component: u8,
20611    #[doc = "data length"]
20612    pub length: u8,
20613    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
20614    pub first_message_offset: u8,
20615    #[doc = "logged data"]
20616    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20617    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
20618    pub data: [u8; 249],
20619}
20620impl LOGGING_DATA_ACKED_DATA {
20621    pub const ENCODED_LEN: usize = 255usize;
20622    pub const DEFAULT: Self = Self {
20623        sequence: 0_u16,
20624        target_system: 0_u8,
20625        target_component: 0_u8,
20626        length: 0_u8,
20627        first_message_offset: 0_u8,
20628        data: [0_u8; 249usize],
20629    };
20630    #[cfg(feature = "arbitrary")]
20631    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20632        use arbitrary::{Arbitrary, Unstructured};
20633        let mut buf = [0u8; 1024];
20634        rng.fill_bytes(&mut buf);
20635        let mut unstructured = Unstructured::new(&buf);
20636        Self::arbitrary(&mut unstructured).unwrap_or_default()
20637    }
20638}
20639impl Default for LOGGING_DATA_ACKED_DATA {
20640    fn default() -> Self {
20641        Self::DEFAULT.clone()
20642    }
20643}
20644impl MessageData for LOGGING_DATA_ACKED_DATA {
20645    type Message = MavMessage;
20646    const ID: u32 = 267u32;
20647    const NAME: &'static str = "LOGGING_DATA_ACKED";
20648    const EXTRA_CRC: u8 = 35u8;
20649    const ENCODED_LEN: usize = 255usize;
20650    fn deser(
20651        _version: MavlinkVersion,
20652        __input: &[u8],
20653    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20654        let avail_len = __input.len();
20655        let mut payload_buf = [0; Self::ENCODED_LEN];
20656        let mut buf = if avail_len < Self::ENCODED_LEN {
20657            payload_buf[0..avail_len].copy_from_slice(__input);
20658            Bytes::new(&payload_buf)
20659        } else {
20660            Bytes::new(__input)
20661        };
20662        let mut __struct = Self::default();
20663        __struct.sequence = buf.get_u16_le()?;
20664        __struct.target_system = buf.get_u8()?;
20665        __struct.target_component = buf.get_u8()?;
20666        __struct.length = buf.get_u8()?;
20667        __struct.first_message_offset = buf.get_u8()?;
20668        for v in &mut __struct.data {
20669            let val = buf.get_u8()?;
20670            *v = val;
20671        }
20672        Ok(__struct)
20673    }
20674    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20675        let mut __tmp = BytesMut::new(bytes);
20676        #[allow(clippy::absurd_extreme_comparisons)]
20677        #[allow(unused_comparisons)]
20678        if __tmp.remaining() < Self::ENCODED_LEN {
20679            panic!(
20680                "buffer is too small (need {} bytes, but got {})",
20681                Self::ENCODED_LEN,
20682                __tmp.remaining(),
20683            )
20684        }
20685        __tmp.put_u16_le(self.sequence);
20686        __tmp.put_u8(self.target_system);
20687        __tmp.put_u8(self.target_component);
20688        __tmp.put_u8(self.length);
20689        __tmp.put_u8(self.first_message_offset);
20690        for val in &self.data {
20691            __tmp.put_u8(*val);
20692        }
20693        if matches!(version, MavlinkVersion::V2) {
20694            let len = __tmp.len();
20695            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20696        } else {
20697            __tmp.len()
20698        }
20699    }
20700}
20701#[doc = "Reply to LOG_REQUEST_DATA."]
20702#[doc = ""]
20703#[doc = "ID: 120"]
20704#[derive(Debug, Clone, PartialEq)]
20705#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20706#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20707#[cfg_attr(feature = "ts", derive(TS))]
20708#[cfg_attr(feature = "ts", ts(export))]
20709pub struct LOG_DATA_DATA {
20710    #[doc = "Offset into the log"]
20711    pub ofs: u32,
20712    #[doc = "Log id (from LOG_ENTRY reply)"]
20713    pub id: u16,
20714    #[doc = "Number of bytes (zero for end of log)"]
20715    pub count: u8,
20716    #[doc = "log data"]
20717    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20718    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
20719    pub data: [u8; 90],
20720}
20721impl LOG_DATA_DATA {
20722    pub const ENCODED_LEN: usize = 97usize;
20723    pub const DEFAULT: Self = Self {
20724        ofs: 0_u32,
20725        id: 0_u16,
20726        count: 0_u8,
20727        data: [0_u8; 90usize],
20728    };
20729    #[cfg(feature = "arbitrary")]
20730    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20731        use arbitrary::{Arbitrary, Unstructured};
20732        let mut buf = [0u8; 1024];
20733        rng.fill_bytes(&mut buf);
20734        let mut unstructured = Unstructured::new(&buf);
20735        Self::arbitrary(&mut unstructured).unwrap_or_default()
20736    }
20737}
20738impl Default for LOG_DATA_DATA {
20739    fn default() -> Self {
20740        Self::DEFAULT.clone()
20741    }
20742}
20743impl MessageData for LOG_DATA_DATA {
20744    type Message = MavMessage;
20745    const ID: u32 = 120u32;
20746    const NAME: &'static str = "LOG_DATA";
20747    const EXTRA_CRC: u8 = 134u8;
20748    const ENCODED_LEN: usize = 97usize;
20749    fn deser(
20750        _version: MavlinkVersion,
20751        __input: &[u8],
20752    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20753        let avail_len = __input.len();
20754        let mut payload_buf = [0; Self::ENCODED_LEN];
20755        let mut buf = if avail_len < Self::ENCODED_LEN {
20756            payload_buf[0..avail_len].copy_from_slice(__input);
20757            Bytes::new(&payload_buf)
20758        } else {
20759            Bytes::new(__input)
20760        };
20761        let mut __struct = Self::default();
20762        __struct.ofs = buf.get_u32_le()?;
20763        __struct.id = buf.get_u16_le()?;
20764        __struct.count = buf.get_u8()?;
20765        for v in &mut __struct.data {
20766            let val = buf.get_u8()?;
20767            *v = val;
20768        }
20769        Ok(__struct)
20770    }
20771    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20772        let mut __tmp = BytesMut::new(bytes);
20773        #[allow(clippy::absurd_extreme_comparisons)]
20774        #[allow(unused_comparisons)]
20775        if __tmp.remaining() < Self::ENCODED_LEN {
20776            panic!(
20777                "buffer is too small (need {} bytes, but got {})",
20778                Self::ENCODED_LEN,
20779                __tmp.remaining(),
20780            )
20781        }
20782        __tmp.put_u32_le(self.ofs);
20783        __tmp.put_u16_le(self.id);
20784        __tmp.put_u8(self.count);
20785        for val in &self.data {
20786            __tmp.put_u8(*val);
20787        }
20788        if matches!(version, MavlinkVersion::V2) {
20789            let len = __tmp.len();
20790            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20791        } else {
20792            __tmp.len()
20793        }
20794    }
20795}
20796#[doc = "Reply to LOG_REQUEST_LIST."]
20797#[doc = ""]
20798#[doc = "ID: 118"]
20799#[derive(Debug, Clone, PartialEq)]
20800#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20801#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20802#[cfg_attr(feature = "ts", derive(TS))]
20803#[cfg_attr(feature = "ts", ts(export))]
20804pub struct LOG_ENTRY_DATA {
20805    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
20806    pub time_utc: u32,
20807    #[doc = "Size of the log (may be approximate)"]
20808    pub size: u32,
20809    #[doc = "Log id"]
20810    pub id: u16,
20811    #[doc = "Total number of logs"]
20812    pub num_logs: u16,
20813    #[doc = "High log number"]
20814    pub last_log_num: u16,
20815}
20816impl LOG_ENTRY_DATA {
20817    pub const ENCODED_LEN: usize = 14usize;
20818    pub const DEFAULT: Self = Self {
20819        time_utc: 0_u32,
20820        size: 0_u32,
20821        id: 0_u16,
20822        num_logs: 0_u16,
20823        last_log_num: 0_u16,
20824    };
20825    #[cfg(feature = "arbitrary")]
20826    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20827        use arbitrary::{Arbitrary, Unstructured};
20828        let mut buf = [0u8; 1024];
20829        rng.fill_bytes(&mut buf);
20830        let mut unstructured = Unstructured::new(&buf);
20831        Self::arbitrary(&mut unstructured).unwrap_or_default()
20832    }
20833}
20834impl Default for LOG_ENTRY_DATA {
20835    fn default() -> Self {
20836        Self::DEFAULT.clone()
20837    }
20838}
20839impl MessageData for LOG_ENTRY_DATA {
20840    type Message = MavMessage;
20841    const ID: u32 = 118u32;
20842    const NAME: &'static str = "LOG_ENTRY";
20843    const EXTRA_CRC: u8 = 56u8;
20844    const ENCODED_LEN: usize = 14usize;
20845    fn deser(
20846        _version: MavlinkVersion,
20847        __input: &[u8],
20848    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20849        let avail_len = __input.len();
20850        let mut payload_buf = [0; Self::ENCODED_LEN];
20851        let mut buf = if avail_len < Self::ENCODED_LEN {
20852            payload_buf[0..avail_len].copy_from_slice(__input);
20853            Bytes::new(&payload_buf)
20854        } else {
20855            Bytes::new(__input)
20856        };
20857        let mut __struct = Self::default();
20858        __struct.time_utc = buf.get_u32_le()?;
20859        __struct.size = buf.get_u32_le()?;
20860        __struct.id = buf.get_u16_le()?;
20861        __struct.num_logs = buf.get_u16_le()?;
20862        __struct.last_log_num = buf.get_u16_le()?;
20863        Ok(__struct)
20864    }
20865    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20866        let mut __tmp = BytesMut::new(bytes);
20867        #[allow(clippy::absurd_extreme_comparisons)]
20868        #[allow(unused_comparisons)]
20869        if __tmp.remaining() < Self::ENCODED_LEN {
20870            panic!(
20871                "buffer is too small (need {} bytes, but got {})",
20872                Self::ENCODED_LEN,
20873                __tmp.remaining(),
20874            )
20875        }
20876        __tmp.put_u32_le(self.time_utc);
20877        __tmp.put_u32_le(self.size);
20878        __tmp.put_u16_le(self.id);
20879        __tmp.put_u16_le(self.num_logs);
20880        __tmp.put_u16_le(self.last_log_num);
20881        if matches!(version, MavlinkVersion::V2) {
20882            let len = __tmp.len();
20883            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20884        } else {
20885            __tmp.len()
20886        }
20887    }
20888}
20889#[doc = "Erase all logs."]
20890#[doc = ""]
20891#[doc = "ID: 121"]
20892#[derive(Debug, Clone, PartialEq)]
20893#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20894#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20895#[cfg_attr(feature = "ts", derive(TS))]
20896#[cfg_attr(feature = "ts", ts(export))]
20897pub struct LOG_ERASE_DATA {
20898    #[doc = "System ID"]
20899    pub target_system: u8,
20900    #[doc = "Component ID"]
20901    pub target_component: u8,
20902}
20903impl LOG_ERASE_DATA {
20904    pub const ENCODED_LEN: usize = 2usize;
20905    pub const DEFAULT: Self = Self {
20906        target_system: 0_u8,
20907        target_component: 0_u8,
20908    };
20909    #[cfg(feature = "arbitrary")]
20910    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20911        use arbitrary::{Arbitrary, Unstructured};
20912        let mut buf = [0u8; 1024];
20913        rng.fill_bytes(&mut buf);
20914        let mut unstructured = Unstructured::new(&buf);
20915        Self::arbitrary(&mut unstructured).unwrap_or_default()
20916    }
20917}
20918impl Default for LOG_ERASE_DATA {
20919    fn default() -> Self {
20920        Self::DEFAULT.clone()
20921    }
20922}
20923impl MessageData for LOG_ERASE_DATA {
20924    type Message = MavMessage;
20925    const ID: u32 = 121u32;
20926    const NAME: &'static str = "LOG_ERASE";
20927    const EXTRA_CRC: u8 = 237u8;
20928    const ENCODED_LEN: usize = 2usize;
20929    fn deser(
20930        _version: MavlinkVersion,
20931        __input: &[u8],
20932    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20933        let avail_len = __input.len();
20934        let mut payload_buf = [0; Self::ENCODED_LEN];
20935        let mut buf = if avail_len < Self::ENCODED_LEN {
20936            payload_buf[0..avail_len].copy_from_slice(__input);
20937            Bytes::new(&payload_buf)
20938        } else {
20939            Bytes::new(__input)
20940        };
20941        let mut __struct = Self::default();
20942        __struct.target_system = buf.get_u8()?;
20943        __struct.target_component = buf.get_u8()?;
20944        Ok(__struct)
20945    }
20946    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20947        let mut __tmp = BytesMut::new(bytes);
20948        #[allow(clippy::absurd_extreme_comparisons)]
20949        #[allow(unused_comparisons)]
20950        if __tmp.remaining() < Self::ENCODED_LEN {
20951            panic!(
20952                "buffer is too small (need {} bytes, but got {})",
20953                Self::ENCODED_LEN,
20954                __tmp.remaining(),
20955            )
20956        }
20957        __tmp.put_u8(self.target_system);
20958        __tmp.put_u8(self.target_component);
20959        if matches!(version, MavlinkVersion::V2) {
20960            let len = __tmp.len();
20961            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20962        } else {
20963            __tmp.len()
20964        }
20965    }
20966}
20967#[doc = "Request a chunk of a log."]
20968#[doc = ""]
20969#[doc = "ID: 119"]
20970#[derive(Debug, Clone, PartialEq)]
20971#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20972#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20973#[cfg_attr(feature = "ts", derive(TS))]
20974#[cfg_attr(feature = "ts", ts(export))]
20975pub struct LOG_REQUEST_DATA_DATA {
20976    #[doc = "Offset into the log"]
20977    pub ofs: u32,
20978    #[doc = "Number of bytes"]
20979    pub count: u32,
20980    #[doc = "Log id (from LOG_ENTRY reply)"]
20981    pub id: u16,
20982    #[doc = "System ID"]
20983    pub target_system: u8,
20984    #[doc = "Component ID"]
20985    pub target_component: u8,
20986}
20987impl LOG_REQUEST_DATA_DATA {
20988    pub const ENCODED_LEN: usize = 12usize;
20989    pub const DEFAULT: Self = Self {
20990        ofs: 0_u32,
20991        count: 0_u32,
20992        id: 0_u16,
20993        target_system: 0_u8,
20994        target_component: 0_u8,
20995    };
20996    #[cfg(feature = "arbitrary")]
20997    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20998        use arbitrary::{Arbitrary, Unstructured};
20999        let mut buf = [0u8; 1024];
21000        rng.fill_bytes(&mut buf);
21001        let mut unstructured = Unstructured::new(&buf);
21002        Self::arbitrary(&mut unstructured).unwrap_or_default()
21003    }
21004}
21005impl Default for LOG_REQUEST_DATA_DATA {
21006    fn default() -> Self {
21007        Self::DEFAULT.clone()
21008    }
21009}
21010impl MessageData for LOG_REQUEST_DATA_DATA {
21011    type Message = MavMessage;
21012    const ID: u32 = 119u32;
21013    const NAME: &'static str = "LOG_REQUEST_DATA";
21014    const EXTRA_CRC: u8 = 116u8;
21015    const ENCODED_LEN: usize = 12usize;
21016    fn deser(
21017        _version: MavlinkVersion,
21018        __input: &[u8],
21019    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21020        let avail_len = __input.len();
21021        let mut payload_buf = [0; Self::ENCODED_LEN];
21022        let mut buf = if avail_len < Self::ENCODED_LEN {
21023            payload_buf[0..avail_len].copy_from_slice(__input);
21024            Bytes::new(&payload_buf)
21025        } else {
21026            Bytes::new(__input)
21027        };
21028        let mut __struct = Self::default();
21029        __struct.ofs = buf.get_u32_le()?;
21030        __struct.count = buf.get_u32_le()?;
21031        __struct.id = buf.get_u16_le()?;
21032        __struct.target_system = buf.get_u8()?;
21033        __struct.target_component = buf.get_u8()?;
21034        Ok(__struct)
21035    }
21036    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21037        let mut __tmp = BytesMut::new(bytes);
21038        #[allow(clippy::absurd_extreme_comparisons)]
21039        #[allow(unused_comparisons)]
21040        if __tmp.remaining() < Self::ENCODED_LEN {
21041            panic!(
21042                "buffer is too small (need {} bytes, but got {})",
21043                Self::ENCODED_LEN,
21044                __tmp.remaining(),
21045            )
21046        }
21047        __tmp.put_u32_le(self.ofs);
21048        __tmp.put_u32_le(self.count);
21049        __tmp.put_u16_le(self.id);
21050        __tmp.put_u8(self.target_system);
21051        __tmp.put_u8(self.target_component);
21052        if matches!(version, MavlinkVersion::V2) {
21053            let len = __tmp.len();
21054            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21055        } else {
21056            __tmp.len()
21057        }
21058    }
21059}
21060#[doc = "Stop log transfer and resume normal logging."]
21061#[doc = ""]
21062#[doc = "ID: 122"]
21063#[derive(Debug, Clone, PartialEq)]
21064#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21065#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21066#[cfg_attr(feature = "ts", derive(TS))]
21067#[cfg_attr(feature = "ts", ts(export))]
21068pub struct LOG_REQUEST_END_DATA {
21069    #[doc = "System ID"]
21070    pub target_system: u8,
21071    #[doc = "Component ID"]
21072    pub target_component: u8,
21073}
21074impl LOG_REQUEST_END_DATA {
21075    pub const ENCODED_LEN: usize = 2usize;
21076    pub const DEFAULT: Self = Self {
21077        target_system: 0_u8,
21078        target_component: 0_u8,
21079    };
21080    #[cfg(feature = "arbitrary")]
21081    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21082        use arbitrary::{Arbitrary, Unstructured};
21083        let mut buf = [0u8; 1024];
21084        rng.fill_bytes(&mut buf);
21085        let mut unstructured = Unstructured::new(&buf);
21086        Self::arbitrary(&mut unstructured).unwrap_or_default()
21087    }
21088}
21089impl Default for LOG_REQUEST_END_DATA {
21090    fn default() -> Self {
21091        Self::DEFAULT.clone()
21092    }
21093}
21094impl MessageData for LOG_REQUEST_END_DATA {
21095    type Message = MavMessage;
21096    const ID: u32 = 122u32;
21097    const NAME: &'static str = "LOG_REQUEST_END";
21098    const EXTRA_CRC: u8 = 203u8;
21099    const ENCODED_LEN: usize = 2usize;
21100    fn deser(
21101        _version: MavlinkVersion,
21102        __input: &[u8],
21103    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21104        let avail_len = __input.len();
21105        let mut payload_buf = [0; Self::ENCODED_LEN];
21106        let mut buf = if avail_len < Self::ENCODED_LEN {
21107            payload_buf[0..avail_len].copy_from_slice(__input);
21108            Bytes::new(&payload_buf)
21109        } else {
21110            Bytes::new(__input)
21111        };
21112        let mut __struct = Self::default();
21113        __struct.target_system = buf.get_u8()?;
21114        __struct.target_component = buf.get_u8()?;
21115        Ok(__struct)
21116    }
21117    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21118        let mut __tmp = BytesMut::new(bytes);
21119        #[allow(clippy::absurd_extreme_comparisons)]
21120        #[allow(unused_comparisons)]
21121        if __tmp.remaining() < Self::ENCODED_LEN {
21122            panic!(
21123                "buffer is too small (need {} bytes, but got {})",
21124                Self::ENCODED_LEN,
21125                __tmp.remaining(),
21126            )
21127        }
21128        __tmp.put_u8(self.target_system);
21129        __tmp.put_u8(self.target_component);
21130        if matches!(version, MavlinkVersion::V2) {
21131            let len = __tmp.len();
21132            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21133        } else {
21134            __tmp.len()
21135        }
21136    }
21137}
21138#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
21139#[doc = ""]
21140#[doc = "ID: 117"]
21141#[derive(Debug, Clone, PartialEq)]
21142#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21143#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21144#[cfg_attr(feature = "ts", derive(TS))]
21145#[cfg_attr(feature = "ts", ts(export))]
21146pub struct LOG_REQUEST_LIST_DATA {
21147    #[doc = "First log id (0 for first available)"]
21148    pub start: u16,
21149    #[doc = "Last log id (0xffff for last available)"]
21150    pub end: u16,
21151    #[doc = "System ID"]
21152    pub target_system: u8,
21153    #[doc = "Component ID"]
21154    pub target_component: u8,
21155}
21156impl LOG_REQUEST_LIST_DATA {
21157    pub const ENCODED_LEN: usize = 6usize;
21158    pub const DEFAULT: Self = Self {
21159        start: 0_u16,
21160        end: 0_u16,
21161        target_system: 0_u8,
21162        target_component: 0_u8,
21163    };
21164    #[cfg(feature = "arbitrary")]
21165    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21166        use arbitrary::{Arbitrary, Unstructured};
21167        let mut buf = [0u8; 1024];
21168        rng.fill_bytes(&mut buf);
21169        let mut unstructured = Unstructured::new(&buf);
21170        Self::arbitrary(&mut unstructured).unwrap_or_default()
21171    }
21172}
21173impl Default for LOG_REQUEST_LIST_DATA {
21174    fn default() -> Self {
21175        Self::DEFAULT.clone()
21176    }
21177}
21178impl MessageData for LOG_REQUEST_LIST_DATA {
21179    type Message = MavMessage;
21180    const ID: u32 = 117u32;
21181    const NAME: &'static str = "LOG_REQUEST_LIST";
21182    const EXTRA_CRC: u8 = 128u8;
21183    const ENCODED_LEN: usize = 6usize;
21184    fn deser(
21185        _version: MavlinkVersion,
21186        __input: &[u8],
21187    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21188        let avail_len = __input.len();
21189        let mut payload_buf = [0; Self::ENCODED_LEN];
21190        let mut buf = if avail_len < Self::ENCODED_LEN {
21191            payload_buf[0..avail_len].copy_from_slice(__input);
21192            Bytes::new(&payload_buf)
21193        } else {
21194            Bytes::new(__input)
21195        };
21196        let mut __struct = Self::default();
21197        __struct.start = buf.get_u16_le()?;
21198        __struct.end = buf.get_u16_le()?;
21199        __struct.target_system = buf.get_u8()?;
21200        __struct.target_component = buf.get_u8()?;
21201        Ok(__struct)
21202    }
21203    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21204        let mut __tmp = BytesMut::new(bytes);
21205        #[allow(clippy::absurd_extreme_comparisons)]
21206        #[allow(unused_comparisons)]
21207        if __tmp.remaining() < Self::ENCODED_LEN {
21208            panic!(
21209                "buffer is too small (need {} bytes, but got {})",
21210                Self::ENCODED_LEN,
21211                __tmp.remaining(),
21212            )
21213        }
21214        __tmp.put_u16_le(self.start);
21215        __tmp.put_u16_le(self.end);
21216        __tmp.put_u8(self.target_system);
21217        __tmp.put_u8(self.target_component);
21218        if matches!(version, MavlinkVersion::V2) {
21219            let len = __tmp.len();
21220            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21221        } else {
21222            __tmp.len()
21223        }
21224    }
21225}
21226#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
21227#[doc = ""]
21228#[doc = "ID: 192"]
21229#[derive(Debug, Clone, PartialEq)]
21230#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21231#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21232#[cfg_attr(feature = "ts", derive(TS))]
21233#[cfg_attr(feature = "ts", ts(export))]
21234pub struct MAG_CAL_REPORT_DATA {
21235    #[doc = "RMS milligauss residuals."]
21236    pub fitness: f32,
21237    #[doc = "X offset."]
21238    pub ofs_x: f32,
21239    #[doc = "Y offset."]
21240    pub ofs_y: f32,
21241    #[doc = "Z offset."]
21242    pub ofs_z: f32,
21243    #[doc = "X diagonal (matrix 11)."]
21244    pub diag_x: f32,
21245    #[doc = "Y diagonal (matrix 22)."]
21246    pub diag_y: f32,
21247    #[doc = "Z diagonal (matrix 33)."]
21248    pub diag_z: f32,
21249    #[doc = "X off-diagonal (matrix 12 and 21)."]
21250    pub offdiag_x: f32,
21251    #[doc = "Y off-diagonal (matrix 13 and 31)."]
21252    pub offdiag_y: f32,
21253    #[doc = "Z off-diagonal (matrix 32 and 23)."]
21254    pub offdiag_z: f32,
21255    #[doc = "Compass being calibrated."]
21256    pub compass_id: u8,
21257    #[doc = "Bitmask of compasses being calibrated."]
21258    pub cal_mask: u8,
21259    #[doc = "Calibration Status."]
21260    pub cal_status: MagCalStatus,
21261    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
21262    pub autosaved: u8,
21263    #[doc = "Confidence in orientation (higher is better)."]
21264    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21265    pub orientation_confidence: f32,
21266    #[doc = "orientation before calibration."]
21267    #[cfg_attr(feature = "serde", serde(default))]
21268    pub old_orientation: MavSensorOrientation,
21269    #[doc = "orientation after calibration."]
21270    #[cfg_attr(feature = "serde", serde(default))]
21271    pub new_orientation: MavSensorOrientation,
21272    #[doc = "field radius correction factor"]
21273    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21274    pub scale_factor: f32,
21275}
21276impl MAG_CAL_REPORT_DATA {
21277    pub const ENCODED_LEN: usize = 54usize;
21278    pub const DEFAULT: Self = Self {
21279        fitness: 0.0_f32,
21280        ofs_x: 0.0_f32,
21281        ofs_y: 0.0_f32,
21282        ofs_z: 0.0_f32,
21283        diag_x: 0.0_f32,
21284        diag_y: 0.0_f32,
21285        diag_z: 0.0_f32,
21286        offdiag_x: 0.0_f32,
21287        offdiag_y: 0.0_f32,
21288        offdiag_z: 0.0_f32,
21289        compass_id: 0_u8,
21290        cal_mask: 0_u8,
21291        cal_status: MagCalStatus::DEFAULT,
21292        autosaved: 0_u8,
21293        orientation_confidence: 0.0_f32,
21294        old_orientation: MavSensorOrientation::DEFAULT,
21295        new_orientation: MavSensorOrientation::DEFAULT,
21296        scale_factor: 0.0_f32,
21297    };
21298    #[cfg(feature = "arbitrary")]
21299    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21300        use arbitrary::{Arbitrary, Unstructured};
21301        let mut buf = [0u8; 1024];
21302        rng.fill_bytes(&mut buf);
21303        let mut unstructured = Unstructured::new(&buf);
21304        Self::arbitrary(&mut unstructured).unwrap_or_default()
21305    }
21306}
21307impl Default for MAG_CAL_REPORT_DATA {
21308    fn default() -> Self {
21309        Self::DEFAULT.clone()
21310    }
21311}
21312impl MessageData for MAG_CAL_REPORT_DATA {
21313    type Message = MavMessage;
21314    const ID: u32 = 192u32;
21315    const NAME: &'static str = "MAG_CAL_REPORT";
21316    const EXTRA_CRC: u8 = 36u8;
21317    const ENCODED_LEN: usize = 54usize;
21318    fn deser(
21319        _version: MavlinkVersion,
21320        __input: &[u8],
21321    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21322        let avail_len = __input.len();
21323        let mut payload_buf = [0; Self::ENCODED_LEN];
21324        let mut buf = if avail_len < Self::ENCODED_LEN {
21325            payload_buf[0..avail_len].copy_from_slice(__input);
21326            Bytes::new(&payload_buf)
21327        } else {
21328            Bytes::new(__input)
21329        };
21330        let mut __struct = Self::default();
21331        __struct.fitness = buf.get_f32_le()?;
21332        __struct.ofs_x = buf.get_f32_le()?;
21333        __struct.ofs_y = buf.get_f32_le()?;
21334        __struct.ofs_z = buf.get_f32_le()?;
21335        __struct.diag_x = buf.get_f32_le()?;
21336        __struct.diag_y = buf.get_f32_le()?;
21337        __struct.diag_z = buf.get_f32_le()?;
21338        __struct.offdiag_x = buf.get_f32_le()?;
21339        __struct.offdiag_y = buf.get_f32_le()?;
21340        __struct.offdiag_z = buf.get_f32_le()?;
21341        __struct.compass_id = buf.get_u8()?;
21342        __struct.cal_mask = buf.get_u8()?;
21343        let tmp = buf.get_u8()?;
21344        __struct.cal_status =
21345            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21346                enum_type: "MagCalStatus",
21347                value: tmp as u64,
21348            })?;
21349        __struct.autosaved = buf.get_u8()?;
21350        __struct.orientation_confidence = buf.get_f32_le()?;
21351        let tmp = buf.get_u8()?;
21352        __struct.old_orientation =
21353            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21354                enum_type: "MavSensorOrientation",
21355                value: tmp as u64,
21356            })?;
21357        let tmp = buf.get_u8()?;
21358        __struct.new_orientation =
21359            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21360                enum_type: "MavSensorOrientation",
21361                value: tmp as u64,
21362            })?;
21363        __struct.scale_factor = buf.get_f32_le()?;
21364        Ok(__struct)
21365    }
21366    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21367        let mut __tmp = BytesMut::new(bytes);
21368        #[allow(clippy::absurd_extreme_comparisons)]
21369        #[allow(unused_comparisons)]
21370        if __tmp.remaining() < Self::ENCODED_LEN {
21371            panic!(
21372                "buffer is too small (need {} bytes, but got {})",
21373                Self::ENCODED_LEN,
21374                __tmp.remaining(),
21375            )
21376        }
21377        __tmp.put_f32_le(self.fitness);
21378        __tmp.put_f32_le(self.ofs_x);
21379        __tmp.put_f32_le(self.ofs_y);
21380        __tmp.put_f32_le(self.ofs_z);
21381        __tmp.put_f32_le(self.diag_x);
21382        __tmp.put_f32_le(self.diag_y);
21383        __tmp.put_f32_le(self.diag_z);
21384        __tmp.put_f32_le(self.offdiag_x);
21385        __tmp.put_f32_le(self.offdiag_y);
21386        __tmp.put_f32_le(self.offdiag_z);
21387        __tmp.put_u8(self.compass_id);
21388        __tmp.put_u8(self.cal_mask);
21389        __tmp.put_u8(self.cal_status as u8);
21390        __tmp.put_u8(self.autosaved);
21391        if matches!(version, MavlinkVersion::V2) {
21392            __tmp.put_f32_le(self.orientation_confidence);
21393            __tmp.put_u8(self.old_orientation as u8);
21394            __tmp.put_u8(self.new_orientation as u8);
21395            __tmp.put_f32_le(self.scale_factor);
21396            let len = __tmp.len();
21397            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21398        } else {
21399            __tmp.len()
21400        }
21401    }
21402}
21403#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
21404#[doc = ""]
21405#[doc = "ID: 69"]
21406#[derive(Debug, Clone, PartialEq)]
21407#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21408#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21409#[cfg_attr(feature = "ts", derive(TS))]
21410#[cfg_attr(feature = "ts", ts(export))]
21411pub struct MANUAL_CONTROL_DATA {
21412    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
21413    pub x: i16,
21414    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
21415    pub y: i16,
21416    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
21417    pub z: i16,
21418    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
21419    pub r: i16,
21420    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
21421    pub buttons: u16,
21422    #[doc = "The system to be controlled."]
21423    pub target: u8,
21424    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
21425    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21426    pub buttons2: u16,
21427    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
21428    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21429    pub enabled_extensions: u8,
21430    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
21431    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21432    pub s: i16,
21433    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
21434    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21435    pub t: i16,
21436    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
21437    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21438    pub aux1: i16,
21439    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
21440    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21441    pub aux2: i16,
21442    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
21443    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21444    pub aux3: i16,
21445    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
21446    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21447    pub aux4: i16,
21448    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
21449    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21450    pub aux5: i16,
21451    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
21452    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21453    pub aux6: i16,
21454}
21455impl MANUAL_CONTROL_DATA {
21456    pub const ENCODED_LEN: usize = 30usize;
21457    pub const DEFAULT: Self = Self {
21458        x: 0_i16,
21459        y: 0_i16,
21460        z: 0_i16,
21461        r: 0_i16,
21462        buttons: 0_u16,
21463        target: 0_u8,
21464        buttons2: 0_u16,
21465        enabled_extensions: 0_u8,
21466        s: 0_i16,
21467        t: 0_i16,
21468        aux1: 0_i16,
21469        aux2: 0_i16,
21470        aux3: 0_i16,
21471        aux4: 0_i16,
21472        aux5: 0_i16,
21473        aux6: 0_i16,
21474    };
21475    #[cfg(feature = "arbitrary")]
21476    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21477        use arbitrary::{Arbitrary, Unstructured};
21478        let mut buf = [0u8; 1024];
21479        rng.fill_bytes(&mut buf);
21480        let mut unstructured = Unstructured::new(&buf);
21481        Self::arbitrary(&mut unstructured).unwrap_or_default()
21482    }
21483}
21484impl Default for MANUAL_CONTROL_DATA {
21485    fn default() -> Self {
21486        Self::DEFAULT.clone()
21487    }
21488}
21489impl MessageData for MANUAL_CONTROL_DATA {
21490    type Message = MavMessage;
21491    const ID: u32 = 69u32;
21492    const NAME: &'static str = "MANUAL_CONTROL";
21493    const EXTRA_CRC: u8 = 243u8;
21494    const ENCODED_LEN: usize = 30usize;
21495    fn deser(
21496        _version: MavlinkVersion,
21497        __input: &[u8],
21498    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21499        let avail_len = __input.len();
21500        let mut payload_buf = [0; Self::ENCODED_LEN];
21501        let mut buf = if avail_len < Self::ENCODED_LEN {
21502            payload_buf[0..avail_len].copy_from_slice(__input);
21503            Bytes::new(&payload_buf)
21504        } else {
21505            Bytes::new(__input)
21506        };
21507        let mut __struct = Self::default();
21508        __struct.x = buf.get_i16_le()?;
21509        __struct.y = buf.get_i16_le()?;
21510        __struct.z = buf.get_i16_le()?;
21511        __struct.r = buf.get_i16_le()?;
21512        __struct.buttons = buf.get_u16_le()?;
21513        __struct.target = buf.get_u8()?;
21514        __struct.buttons2 = buf.get_u16_le()?;
21515        __struct.enabled_extensions = buf.get_u8()?;
21516        __struct.s = buf.get_i16_le()?;
21517        __struct.t = buf.get_i16_le()?;
21518        __struct.aux1 = buf.get_i16_le()?;
21519        __struct.aux2 = buf.get_i16_le()?;
21520        __struct.aux3 = buf.get_i16_le()?;
21521        __struct.aux4 = buf.get_i16_le()?;
21522        __struct.aux5 = buf.get_i16_le()?;
21523        __struct.aux6 = buf.get_i16_le()?;
21524        Ok(__struct)
21525    }
21526    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21527        let mut __tmp = BytesMut::new(bytes);
21528        #[allow(clippy::absurd_extreme_comparisons)]
21529        #[allow(unused_comparisons)]
21530        if __tmp.remaining() < Self::ENCODED_LEN {
21531            panic!(
21532                "buffer is too small (need {} bytes, but got {})",
21533                Self::ENCODED_LEN,
21534                __tmp.remaining(),
21535            )
21536        }
21537        __tmp.put_i16_le(self.x);
21538        __tmp.put_i16_le(self.y);
21539        __tmp.put_i16_le(self.z);
21540        __tmp.put_i16_le(self.r);
21541        __tmp.put_u16_le(self.buttons);
21542        __tmp.put_u8(self.target);
21543        if matches!(version, MavlinkVersion::V2) {
21544            __tmp.put_u16_le(self.buttons2);
21545            __tmp.put_u8(self.enabled_extensions);
21546            __tmp.put_i16_le(self.s);
21547            __tmp.put_i16_le(self.t);
21548            __tmp.put_i16_le(self.aux1);
21549            __tmp.put_i16_le(self.aux2);
21550            __tmp.put_i16_le(self.aux3);
21551            __tmp.put_i16_le(self.aux4);
21552            __tmp.put_i16_le(self.aux5);
21553            __tmp.put_i16_le(self.aux6);
21554            let len = __tmp.len();
21555            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21556        } else {
21557            __tmp.len()
21558        }
21559    }
21560}
21561#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
21562#[doc = ""]
21563#[doc = "ID: 81"]
21564#[derive(Debug, Clone, PartialEq)]
21565#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21566#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21567#[cfg_attr(feature = "ts", derive(TS))]
21568#[cfg_attr(feature = "ts", ts(export))]
21569pub struct MANUAL_SETPOINT_DATA {
21570    #[doc = "Timestamp (time since system boot)."]
21571    pub time_boot_ms: u32,
21572    #[doc = "Desired roll rate"]
21573    pub roll: f32,
21574    #[doc = "Desired pitch rate"]
21575    pub pitch: f32,
21576    #[doc = "Desired yaw rate"]
21577    pub yaw: f32,
21578    #[doc = "Collective thrust, normalized to 0 .. 1"]
21579    pub thrust: f32,
21580    #[doc = "Flight mode switch position, 0.. 255"]
21581    pub mode_switch: u8,
21582    #[doc = "Override mode switch position, 0.. 255"]
21583    pub manual_override_switch: u8,
21584}
21585impl MANUAL_SETPOINT_DATA {
21586    pub const ENCODED_LEN: usize = 22usize;
21587    pub const DEFAULT: Self = Self {
21588        time_boot_ms: 0_u32,
21589        roll: 0.0_f32,
21590        pitch: 0.0_f32,
21591        yaw: 0.0_f32,
21592        thrust: 0.0_f32,
21593        mode_switch: 0_u8,
21594        manual_override_switch: 0_u8,
21595    };
21596    #[cfg(feature = "arbitrary")]
21597    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21598        use arbitrary::{Arbitrary, Unstructured};
21599        let mut buf = [0u8; 1024];
21600        rng.fill_bytes(&mut buf);
21601        let mut unstructured = Unstructured::new(&buf);
21602        Self::arbitrary(&mut unstructured).unwrap_or_default()
21603    }
21604}
21605impl Default for MANUAL_SETPOINT_DATA {
21606    fn default() -> Self {
21607        Self::DEFAULT.clone()
21608    }
21609}
21610impl MessageData for MANUAL_SETPOINT_DATA {
21611    type Message = MavMessage;
21612    const ID: u32 = 81u32;
21613    const NAME: &'static str = "MANUAL_SETPOINT";
21614    const EXTRA_CRC: u8 = 106u8;
21615    const ENCODED_LEN: usize = 22usize;
21616    fn deser(
21617        _version: MavlinkVersion,
21618        __input: &[u8],
21619    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21620        let avail_len = __input.len();
21621        let mut payload_buf = [0; Self::ENCODED_LEN];
21622        let mut buf = if avail_len < Self::ENCODED_LEN {
21623            payload_buf[0..avail_len].copy_from_slice(__input);
21624            Bytes::new(&payload_buf)
21625        } else {
21626            Bytes::new(__input)
21627        };
21628        let mut __struct = Self::default();
21629        __struct.time_boot_ms = buf.get_u32_le()?;
21630        __struct.roll = buf.get_f32_le()?;
21631        __struct.pitch = buf.get_f32_le()?;
21632        __struct.yaw = buf.get_f32_le()?;
21633        __struct.thrust = buf.get_f32_le()?;
21634        __struct.mode_switch = buf.get_u8()?;
21635        __struct.manual_override_switch = buf.get_u8()?;
21636        Ok(__struct)
21637    }
21638    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21639        let mut __tmp = BytesMut::new(bytes);
21640        #[allow(clippy::absurd_extreme_comparisons)]
21641        #[allow(unused_comparisons)]
21642        if __tmp.remaining() < Self::ENCODED_LEN {
21643            panic!(
21644                "buffer is too small (need {} bytes, but got {})",
21645                Self::ENCODED_LEN,
21646                __tmp.remaining(),
21647            )
21648        }
21649        __tmp.put_u32_le(self.time_boot_ms);
21650        __tmp.put_f32_le(self.roll);
21651        __tmp.put_f32_le(self.pitch);
21652        __tmp.put_f32_le(self.yaw);
21653        __tmp.put_f32_le(self.thrust);
21654        __tmp.put_u8(self.mode_switch);
21655        __tmp.put_u8(self.manual_override_switch);
21656        if matches!(version, MavlinkVersion::V2) {
21657            let len = __tmp.len();
21658            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21659        } else {
21660            __tmp.len()
21661        }
21662    }
21663}
21664#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21665#[doc = ""]
21666#[doc = "ID: 249"]
21667#[derive(Debug, Clone, PartialEq)]
21668#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21669#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21670#[cfg_attr(feature = "ts", derive(TS))]
21671#[cfg_attr(feature = "ts", ts(export))]
21672pub struct MEMORY_VECT_DATA {
21673    #[doc = "Starting address of the debug variables"]
21674    pub address: u16,
21675    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
21676    pub ver: u8,
21677    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
21678    pub mavtype: u8,
21679    #[doc = "Memory contents at specified address"]
21680    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21681    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21682    pub value: [i8; 32],
21683}
21684impl MEMORY_VECT_DATA {
21685    pub const ENCODED_LEN: usize = 36usize;
21686    pub const DEFAULT: Self = Self {
21687        address: 0_u16,
21688        ver: 0_u8,
21689        mavtype: 0_u8,
21690        value: [0_i8; 32usize],
21691    };
21692    #[cfg(feature = "arbitrary")]
21693    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21694        use arbitrary::{Arbitrary, Unstructured};
21695        let mut buf = [0u8; 1024];
21696        rng.fill_bytes(&mut buf);
21697        let mut unstructured = Unstructured::new(&buf);
21698        Self::arbitrary(&mut unstructured).unwrap_or_default()
21699    }
21700}
21701impl Default for MEMORY_VECT_DATA {
21702    fn default() -> Self {
21703        Self::DEFAULT.clone()
21704    }
21705}
21706impl MessageData for MEMORY_VECT_DATA {
21707    type Message = MavMessage;
21708    const ID: u32 = 249u32;
21709    const NAME: &'static str = "MEMORY_VECT";
21710    const EXTRA_CRC: u8 = 204u8;
21711    const ENCODED_LEN: usize = 36usize;
21712    fn deser(
21713        _version: MavlinkVersion,
21714        __input: &[u8],
21715    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21716        let avail_len = __input.len();
21717        let mut payload_buf = [0; Self::ENCODED_LEN];
21718        let mut buf = if avail_len < Self::ENCODED_LEN {
21719            payload_buf[0..avail_len].copy_from_slice(__input);
21720            Bytes::new(&payload_buf)
21721        } else {
21722            Bytes::new(__input)
21723        };
21724        let mut __struct = Self::default();
21725        __struct.address = buf.get_u16_le()?;
21726        __struct.ver = buf.get_u8()?;
21727        __struct.mavtype = buf.get_u8()?;
21728        for v in &mut __struct.value {
21729            let val = buf.get_i8()?;
21730            *v = val;
21731        }
21732        Ok(__struct)
21733    }
21734    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21735        let mut __tmp = BytesMut::new(bytes);
21736        #[allow(clippy::absurd_extreme_comparisons)]
21737        #[allow(unused_comparisons)]
21738        if __tmp.remaining() < Self::ENCODED_LEN {
21739            panic!(
21740                "buffer is too small (need {} bytes, but got {})",
21741                Self::ENCODED_LEN,
21742                __tmp.remaining(),
21743            )
21744        }
21745        __tmp.put_u16_le(self.address);
21746        __tmp.put_u8(self.ver);
21747        __tmp.put_u8(self.mavtype);
21748        for val in &self.value {
21749            __tmp.put_i8(*val);
21750        }
21751        if matches!(version, MavlinkVersion::V2) {
21752            let len = __tmp.len();
21753            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21754        } else {
21755            __tmp.len()
21756        }
21757    }
21758}
21759#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
21760#[doc = ""]
21761#[doc = "ID: 244"]
21762#[derive(Debug, Clone, PartialEq)]
21763#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21764#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21765#[cfg_attr(feature = "ts", derive(TS))]
21766#[cfg_attr(feature = "ts", ts(export))]
21767pub struct MESSAGE_INTERVAL_DATA {
21768    #[doc = "The interval between two messages. A value of -1 indicates this stream is disabled, 0 indicates it is not available,&gt;0 indicates the interval at which it is sent."]
21769    pub interval_us: i32,
21770    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
21771    pub message_id: u16,
21772}
21773impl MESSAGE_INTERVAL_DATA {
21774    pub const ENCODED_LEN: usize = 6usize;
21775    pub const DEFAULT: Self = Self {
21776        interval_us: 0_i32,
21777        message_id: 0_u16,
21778    };
21779    #[cfg(feature = "arbitrary")]
21780    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21781        use arbitrary::{Arbitrary, Unstructured};
21782        let mut buf = [0u8; 1024];
21783        rng.fill_bytes(&mut buf);
21784        let mut unstructured = Unstructured::new(&buf);
21785        Self::arbitrary(&mut unstructured).unwrap_or_default()
21786    }
21787}
21788impl Default for MESSAGE_INTERVAL_DATA {
21789    fn default() -> Self {
21790        Self::DEFAULT.clone()
21791    }
21792}
21793impl MessageData for MESSAGE_INTERVAL_DATA {
21794    type Message = MavMessage;
21795    const ID: u32 = 244u32;
21796    const NAME: &'static str = "MESSAGE_INTERVAL";
21797    const EXTRA_CRC: u8 = 95u8;
21798    const ENCODED_LEN: usize = 6usize;
21799    fn deser(
21800        _version: MavlinkVersion,
21801        __input: &[u8],
21802    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21803        let avail_len = __input.len();
21804        let mut payload_buf = [0; Self::ENCODED_LEN];
21805        let mut buf = if avail_len < Self::ENCODED_LEN {
21806            payload_buf[0..avail_len].copy_from_slice(__input);
21807            Bytes::new(&payload_buf)
21808        } else {
21809            Bytes::new(__input)
21810        };
21811        let mut __struct = Self::default();
21812        __struct.interval_us = buf.get_i32_le()?;
21813        __struct.message_id = buf.get_u16_le()?;
21814        Ok(__struct)
21815    }
21816    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21817        let mut __tmp = BytesMut::new(bytes);
21818        #[allow(clippy::absurd_extreme_comparisons)]
21819        #[allow(unused_comparisons)]
21820        if __tmp.remaining() < Self::ENCODED_LEN {
21821            panic!(
21822                "buffer is too small (need {} bytes, but got {})",
21823                Self::ENCODED_LEN,
21824                __tmp.remaining(),
21825            )
21826        }
21827        __tmp.put_i32_le(self.interval_us);
21828        __tmp.put_u16_le(self.message_id);
21829        if matches!(version, MavlinkVersion::V2) {
21830            let len = __tmp.len();
21831            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21832        } else {
21833            __tmp.len()
21834        }
21835    }
21836}
21837#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
21838#[doc = ""]
21839#[doc = "ID: 47"]
21840#[derive(Debug, Clone, PartialEq)]
21841#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21842#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21843#[cfg_attr(feature = "ts", derive(TS))]
21844#[cfg_attr(feature = "ts", ts(export))]
21845pub struct MISSION_ACK_DATA {
21846    #[doc = "System ID"]
21847    pub target_system: u8,
21848    #[doc = "Component ID"]
21849    pub target_component: u8,
21850    #[doc = "Mission result."]
21851    pub mavtype: MavMissionResult,
21852    #[doc = "Mission type."]
21853    #[cfg_attr(feature = "serde", serde(default))]
21854    pub mission_type: MavMissionType,
21855    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
21856    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21857    pub opaque_id: u32,
21858}
21859impl MISSION_ACK_DATA {
21860    pub const ENCODED_LEN: usize = 8usize;
21861    pub const DEFAULT: Self = Self {
21862        target_system: 0_u8,
21863        target_component: 0_u8,
21864        mavtype: MavMissionResult::DEFAULT,
21865        mission_type: MavMissionType::DEFAULT,
21866        opaque_id: 0_u32,
21867    };
21868    #[cfg(feature = "arbitrary")]
21869    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21870        use arbitrary::{Arbitrary, Unstructured};
21871        let mut buf = [0u8; 1024];
21872        rng.fill_bytes(&mut buf);
21873        let mut unstructured = Unstructured::new(&buf);
21874        Self::arbitrary(&mut unstructured).unwrap_or_default()
21875    }
21876}
21877impl Default for MISSION_ACK_DATA {
21878    fn default() -> Self {
21879        Self::DEFAULT.clone()
21880    }
21881}
21882impl MessageData for MISSION_ACK_DATA {
21883    type Message = MavMessage;
21884    const ID: u32 = 47u32;
21885    const NAME: &'static str = "MISSION_ACK";
21886    const EXTRA_CRC: u8 = 153u8;
21887    const ENCODED_LEN: usize = 8usize;
21888    fn deser(
21889        _version: MavlinkVersion,
21890        __input: &[u8],
21891    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21892        let avail_len = __input.len();
21893        let mut payload_buf = [0; Self::ENCODED_LEN];
21894        let mut buf = if avail_len < Self::ENCODED_LEN {
21895            payload_buf[0..avail_len].copy_from_slice(__input);
21896            Bytes::new(&payload_buf)
21897        } else {
21898            Bytes::new(__input)
21899        };
21900        let mut __struct = Self::default();
21901        __struct.target_system = buf.get_u8()?;
21902        __struct.target_component = buf.get_u8()?;
21903        let tmp = buf.get_u8()?;
21904        __struct.mavtype =
21905            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21906                enum_type: "MavMissionResult",
21907                value: tmp as u64,
21908            })?;
21909        let tmp = buf.get_u8()?;
21910        __struct.mission_type =
21911            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21912                enum_type: "MavMissionType",
21913                value: tmp as u64,
21914            })?;
21915        __struct.opaque_id = buf.get_u32_le()?;
21916        Ok(__struct)
21917    }
21918    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21919        let mut __tmp = BytesMut::new(bytes);
21920        #[allow(clippy::absurd_extreme_comparisons)]
21921        #[allow(unused_comparisons)]
21922        if __tmp.remaining() < Self::ENCODED_LEN {
21923            panic!(
21924                "buffer is too small (need {} bytes, but got {})",
21925                Self::ENCODED_LEN,
21926                __tmp.remaining(),
21927            )
21928        }
21929        __tmp.put_u8(self.target_system);
21930        __tmp.put_u8(self.target_component);
21931        __tmp.put_u8(self.mavtype as u8);
21932        if matches!(version, MavlinkVersion::V2) {
21933            __tmp.put_u8(self.mission_type as u8);
21934            __tmp.put_u32_le(self.opaque_id);
21935            let len = __tmp.len();
21936            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21937        } else {
21938            __tmp.len()
21939        }
21940    }
21941}
21942#[doc = "Delete all mission items at once."]
21943#[doc = ""]
21944#[doc = "ID: 45"]
21945#[derive(Debug, Clone, PartialEq)]
21946#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21947#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21948#[cfg_attr(feature = "ts", derive(TS))]
21949#[cfg_attr(feature = "ts", ts(export))]
21950pub struct MISSION_CLEAR_ALL_DATA {
21951    #[doc = "System ID"]
21952    pub target_system: u8,
21953    #[doc = "Component ID"]
21954    pub target_component: u8,
21955    #[doc = "Mission type."]
21956    #[cfg_attr(feature = "serde", serde(default))]
21957    pub mission_type: MavMissionType,
21958}
21959impl MISSION_CLEAR_ALL_DATA {
21960    pub const ENCODED_LEN: usize = 3usize;
21961    pub const DEFAULT: Self = Self {
21962        target_system: 0_u8,
21963        target_component: 0_u8,
21964        mission_type: MavMissionType::DEFAULT,
21965    };
21966    #[cfg(feature = "arbitrary")]
21967    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21968        use arbitrary::{Arbitrary, Unstructured};
21969        let mut buf = [0u8; 1024];
21970        rng.fill_bytes(&mut buf);
21971        let mut unstructured = Unstructured::new(&buf);
21972        Self::arbitrary(&mut unstructured).unwrap_or_default()
21973    }
21974}
21975impl Default for MISSION_CLEAR_ALL_DATA {
21976    fn default() -> Self {
21977        Self::DEFAULT.clone()
21978    }
21979}
21980impl MessageData for MISSION_CLEAR_ALL_DATA {
21981    type Message = MavMessage;
21982    const ID: u32 = 45u32;
21983    const NAME: &'static str = "MISSION_CLEAR_ALL";
21984    const EXTRA_CRC: u8 = 232u8;
21985    const ENCODED_LEN: usize = 3usize;
21986    fn deser(
21987        _version: MavlinkVersion,
21988        __input: &[u8],
21989    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21990        let avail_len = __input.len();
21991        let mut payload_buf = [0; Self::ENCODED_LEN];
21992        let mut buf = if avail_len < Self::ENCODED_LEN {
21993            payload_buf[0..avail_len].copy_from_slice(__input);
21994            Bytes::new(&payload_buf)
21995        } else {
21996            Bytes::new(__input)
21997        };
21998        let mut __struct = Self::default();
21999        __struct.target_system = buf.get_u8()?;
22000        __struct.target_component = buf.get_u8()?;
22001        let tmp = buf.get_u8()?;
22002        __struct.mission_type =
22003            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22004                enum_type: "MavMissionType",
22005                value: tmp as u64,
22006            })?;
22007        Ok(__struct)
22008    }
22009    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22010        let mut __tmp = BytesMut::new(bytes);
22011        #[allow(clippy::absurd_extreme_comparisons)]
22012        #[allow(unused_comparisons)]
22013        if __tmp.remaining() < Self::ENCODED_LEN {
22014            panic!(
22015                "buffer is too small (need {} bytes, but got {})",
22016                Self::ENCODED_LEN,
22017                __tmp.remaining(),
22018            )
22019        }
22020        __tmp.put_u8(self.target_system);
22021        __tmp.put_u8(self.target_component);
22022        if matches!(version, MavlinkVersion::V2) {
22023            __tmp.put_u8(self.mission_type as u8);
22024            let len = __tmp.len();
22025            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22026        } else {
22027            __tmp.len()
22028        }
22029    }
22030}
22031#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
22032#[doc = ""]
22033#[doc = "ID: 44"]
22034#[derive(Debug, Clone, PartialEq)]
22035#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22036#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22037#[cfg_attr(feature = "ts", derive(TS))]
22038#[cfg_attr(feature = "ts", ts(export))]
22039pub struct MISSION_COUNT_DATA {
22040    #[doc = "Number of mission items in the sequence"]
22041    pub count: u16,
22042    #[doc = "System ID"]
22043    pub target_system: u8,
22044    #[doc = "Component ID"]
22045    pub target_component: u8,
22046    #[doc = "Mission type."]
22047    #[cfg_attr(feature = "serde", serde(default))]
22048    pub mission_type: MavMissionType,
22049    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
22050    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22051    pub opaque_id: u32,
22052}
22053impl MISSION_COUNT_DATA {
22054    pub const ENCODED_LEN: usize = 9usize;
22055    pub const DEFAULT: Self = Self {
22056        count: 0_u16,
22057        target_system: 0_u8,
22058        target_component: 0_u8,
22059        mission_type: MavMissionType::DEFAULT,
22060        opaque_id: 0_u32,
22061    };
22062    #[cfg(feature = "arbitrary")]
22063    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22064        use arbitrary::{Arbitrary, Unstructured};
22065        let mut buf = [0u8; 1024];
22066        rng.fill_bytes(&mut buf);
22067        let mut unstructured = Unstructured::new(&buf);
22068        Self::arbitrary(&mut unstructured).unwrap_or_default()
22069    }
22070}
22071impl Default for MISSION_COUNT_DATA {
22072    fn default() -> Self {
22073        Self::DEFAULT.clone()
22074    }
22075}
22076impl MessageData for MISSION_COUNT_DATA {
22077    type Message = MavMessage;
22078    const ID: u32 = 44u32;
22079    const NAME: &'static str = "MISSION_COUNT";
22080    const EXTRA_CRC: u8 = 221u8;
22081    const ENCODED_LEN: usize = 9usize;
22082    fn deser(
22083        _version: MavlinkVersion,
22084        __input: &[u8],
22085    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22086        let avail_len = __input.len();
22087        let mut payload_buf = [0; Self::ENCODED_LEN];
22088        let mut buf = if avail_len < Self::ENCODED_LEN {
22089            payload_buf[0..avail_len].copy_from_slice(__input);
22090            Bytes::new(&payload_buf)
22091        } else {
22092            Bytes::new(__input)
22093        };
22094        let mut __struct = Self::default();
22095        __struct.count = buf.get_u16_le()?;
22096        __struct.target_system = buf.get_u8()?;
22097        __struct.target_component = buf.get_u8()?;
22098        let tmp = buf.get_u8()?;
22099        __struct.mission_type =
22100            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22101                enum_type: "MavMissionType",
22102                value: tmp as u64,
22103            })?;
22104        __struct.opaque_id = buf.get_u32_le()?;
22105        Ok(__struct)
22106    }
22107    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22108        let mut __tmp = BytesMut::new(bytes);
22109        #[allow(clippy::absurd_extreme_comparisons)]
22110        #[allow(unused_comparisons)]
22111        if __tmp.remaining() < Self::ENCODED_LEN {
22112            panic!(
22113                "buffer is too small (need {} bytes, but got {})",
22114                Self::ENCODED_LEN,
22115                __tmp.remaining(),
22116            )
22117        }
22118        __tmp.put_u16_le(self.count);
22119        __tmp.put_u8(self.target_system);
22120        __tmp.put_u8(self.target_component);
22121        if matches!(version, MavlinkVersion::V2) {
22122            __tmp.put_u8(self.mission_type as u8);
22123            __tmp.put_u32_le(self.opaque_id);
22124            let len = __tmp.len();
22125            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22126        } else {
22127            __tmp.len()
22128        }
22129    }
22130}
22131#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
22132#[doc = ""]
22133#[doc = "ID: 42"]
22134#[derive(Debug, Clone, PartialEq)]
22135#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22136#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22137#[cfg_attr(feature = "ts", derive(TS))]
22138#[cfg_attr(feature = "ts", ts(export))]
22139pub struct MISSION_CURRENT_DATA {
22140    #[doc = "Sequence"]
22141    pub seq: u16,
22142    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
22143    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22144    pub total: u16,
22145    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
22146    #[cfg_attr(feature = "serde", serde(default))]
22147    pub mission_state: MissionState,
22148    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
22149    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22150    pub mission_mode: u8,
22151    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
22152    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22153    pub mission_id: u32,
22154    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
22155    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22156    pub fence_id: u32,
22157    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
22158    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22159    pub rally_points_id: u32,
22160}
22161impl MISSION_CURRENT_DATA {
22162    pub const ENCODED_LEN: usize = 18usize;
22163    pub const DEFAULT: Self = Self {
22164        seq: 0_u16,
22165        total: 0_u16,
22166        mission_state: MissionState::DEFAULT,
22167        mission_mode: 0_u8,
22168        mission_id: 0_u32,
22169        fence_id: 0_u32,
22170        rally_points_id: 0_u32,
22171    };
22172    #[cfg(feature = "arbitrary")]
22173    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22174        use arbitrary::{Arbitrary, Unstructured};
22175        let mut buf = [0u8; 1024];
22176        rng.fill_bytes(&mut buf);
22177        let mut unstructured = Unstructured::new(&buf);
22178        Self::arbitrary(&mut unstructured).unwrap_or_default()
22179    }
22180}
22181impl Default for MISSION_CURRENT_DATA {
22182    fn default() -> Self {
22183        Self::DEFAULT.clone()
22184    }
22185}
22186impl MessageData for MISSION_CURRENT_DATA {
22187    type Message = MavMessage;
22188    const ID: u32 = 42u32;
22189    const NAME: &'static str = "MISSION_CURRENT";
22190    const EXTRA_CRC: u8 = 28u8;
22191    const ENCODED_LEN: usize = 18usize;
22192    fn deser(
22193        _version: MavlinkVersion,
22194        __input: &[u8],
22195    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22196        let avail_len = __input.len();
22197        let mut payload_buf = [0; Self::ENCODED_LEN];
22198        let mut buf = if avail_len < Self::ENCODED_LEN {
22199            payload_buf[0..avail_len].copy_from_slice(__input);
22200            Bytes::new(&payload_buf)
22201        } else {
22202            Bytes::new(__input)
22203        };
22204        let mut __struct = Self::default();
22205        __struct.seq = buf.get_u16_le()?;
22206        __struct.total = buf.get_u16_le()?;
22207        let tmp = buf.get_u8()?;
22208        __struct.mission_state =
22209            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22210                enum_type: "MissionState",
22211                value: tmp as u64,
22212            })?;
22213        __struct.mission_mode = buf.get_u8()?;
22214        __struct.mission_id = buf.get_u32_le()?;
22215        __struct.fence_id = buf.get_u32_le()?;
22216        __struct.rally_points_id = buf.get_u32_le()?;
22217        Ok(__struct)
22218    }
22219    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22220        let mut __tmp = BytesMut::new(bytes);
22221        #[allow(clippy::absurd_extreme_comparisons)]
22222        #[allow(unused_comparisons)]
22223        if __tmp.remaining() < Self::ENCODED_LEN {
22224            panic!(
22225                "buffer is too small (need {} bytes, but got {})",
22226                Self::ENCODED_LEN,
22227                __tmp.remaining(),
22228            )
22229        }
22230        __tmp.put_u16_le(self.seq);
22231        if matches!(version, MavlinkVersion::V2) {
22232            __tmp.put_u16_le(self.total);
22233            __tmp.put_u8(self.mission_state as u8);
22234            __tmp.put_u8(self.mission_mode);
22235            __tmp.put_u32_le(self.mission_id);
22236            __tmp.put_u32_le(self.fence_id);
22237            __tmp.put_u32_le(self.rally_points_id);
22238            let len = __tmp.len();
22239            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22240        } else {
22241            __tmp.len()
22242        }
22243    }
22244}
22245#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
22246#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
22247#[doc = ""]
22248#[doc = "ID: 39"]
22249#[derive(Debug, Clone, PartialEq)]
22250#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22251#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22252#[cfg_attr(feature = "ts", derive(TS))]
22253#[cfg_attr(feature = "ts", ts(export))]
22254pub struct MISSION_ITEM_DATA {
22255    #[doc = "PARAM1, see MAV_CMD enum"]
22256    pub param1: f32,
22257    #[doc = "PARAM2, see MAV_CMD enum"]
22258    pub param2: f32,
22259    #[doc = "PARAM3, see MAV_CMD enum"]
22260    pub param3: f32,
22261    #[doc = "PARAM4, see MAV_CMD enum"]
22262    pub param4: f32,
22263    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
22264    pub x: f32,
22265    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
22266    pub y: f32,
22267    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
22268    pub z: f32,
22269    #[doc = "Sequence"]
22270    pub seq: u16,
22271    #[doc = "The scheduled action for the waypoint."]
22272    pub command: MavCmd,
22273    #[doc = "System ID"]
22274    pub target_system: u8,
22275    #[doc = "Component ID"]
22276    pub target_component: u8,
22277    #[doc = "The coordinate system of the waypoint."]
22278    pub frame: MavFrame,
22279    #[doc = "false:0, true:1"]
22280    pub current: u8,
22281    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
22282    pub autocontinue: u8,
22283    #[doc = "Mission type."]
22284    #[cfg_attr(feature = "serde", serde(default))]
22285    pub mission_type: MavMissionType,
22286}
22287impl MISSION_ITEM_DATA {
22288    pub const ENCODED_LEN: usize = 38usize;
22289    pub const DEFAULT: Self = Self {
22290        param1: 0.0_f32,
22291        param2: 0.0_f32,
22292        param3: 0.0_f32,
22293        param4: 0.0_f32,
22294        x: 0.0_f32,
22295        y: 0.0_f32,
22296        z: 0.0_f32,
22297        seq: 0_u16,
22298        command: MavCmd::DEFAULT,
22299        target_system: 0_u8,
22300        target_component: 0_u8,
22301        frame: MavFrame::DEFAULT,
22302        current: 0_u8,
22303        autocontinue: 0_u8,
22304        mission_type: MavMissionType::DEFAULT,
22305    };
22306    #[cfg(feature = "arbitrary")]
22307    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22308        use arbitrary::{Arbitrary, Unstructured};
22309        let mut buf = [0u8; 1024];
22310        rng.fill_bytes(&mut buf);
22311        let mut unstructured = Unstructured::new(&buf);
22312        Self::arbitrary(&mut unstructured).unwrap_or_default()
22313    }
22314}
22315impl Default for MISSION_ITEM_DATA {
22316    fn default() -> Self {
22317        Self::DEFAULT.clone()
22318    }
22319}
22320impl MessageData for MISSION_ITEM_DATA {
22321    type Message = MavMessage;
22322    const ID: u32 = 39u32;
22323    const NAME: &'static str = "MISSION_ITEM";
22324    const EXTRA_CRC: u8 = 254u8;
22325    const ENCODED_LEN: usize = 38usize;
22326    fn deser(
22327        _version: MavlinkVersion,
22328        __input: &[u8],
22329    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22330        let avail_len = __input.len();
22331        let mut payload_buf = [0; Self::ENCODED_LEN];
22332        let mut buf = if avail_len < Self::ENCODED_LEN {
22333            payload_buf[0..avail_len].copy_from_slice(__input);
22334            Bytes::new(&payload_buf)
22335        } else {
22336            Bytes::new(__input)
22337        };
22338        let mut __struct = Self::default();
22339        __struct.param1 = buf.get_f32_le()?;
22340        __struct.param2 = buf.get_f32_le()?;
22341        __struct.param3 = buf.get_f32_le()?;
22342        __struct.param4 = buf.get_f32_le()?;
22343        __struct.x = buf.get_f32_le()?;
22344        __struct.y = buf.get_f32_le()?;
22345        __struct.z = buf.get_f32_le()?;
22346        __struct.seq = buf.get_u16_le()?;
22347        let tmp = buf.get_u16_le()?;
22348        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
22349            ::mavlink_core::error::ParserError::InvalidEnum {
22350                enum_type: "MavCmd",
22351                value: tmp as u64,
22352            },
22353        )?;
22354        __struct.target_system = buf.get_u8()?;
22355        __struct.target_component = buf.get_u8()?;
22356        let tmp = buf.get_u8()?;
22357        __struct.frame =
22358            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22359                enum_type: "MavFrame",
22360                value: tmp as u64,
22361            })?;
22362        __struct.current = buf.get_u8()?;
22363        __struct.autocontinue = buf.get_u8()?;
22364        let tmp = buf.get_u8()?;
22365        __struct.mission_type =
22366            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22367                enum_type: "MavMissionType",
22368                value: tmp as u64,
22369            })?;
22370        Ok(__struct)
22371    }
22372    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22373        let mut __tmp = BytesMut::new(bytes);
22374        #[allow(clippy::absurd_extreme_comparisons)]
22375        #[allow(unused_comparisons)]
22376        if __tmp.remaining() < Self::ENCODED_LEN {
22377            panic!(
22378                "buffer is too small (need {} bytes, but got {})",
22379                Self::ENCODED_LEN,
22380                __tmp.remaining(),
22381            )
22382        }
22383        __tmp.put_f32_le(self.param1);
22384        __tmp.put_f32_le(self.param2);
22385        __tmp.put_f32_le(self.param3);
22386        __tmp.put_f32_le(self.param4);
22387        __tmp.put_f32_le(self.x);
22388        __tmp.put_f32_le(self.y);
22389        __tmp.put_f32_le(self.z);
22390        __tmp.put_u16_le(self.seq);
22391        __tmp.put_u16_le(self.command as u16);
22392        __tmp.put_u8(self.target_system);
22393        __tmp.put_u8(self.target_component);
22394        __tmp.put_u8(self.frame as u8);
22395        __tmp.put_u8(self.current);
22396        __tmp.put_u8(self.autocontinue);
22397        if matches!(version, MavlinkVersion::V2) {
22398            __tmp.put_u8(self.mission_type as u8);
22399            let len = __tmp.len();
22400            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22401        } else {
22402            __tmp.len()
22403        }
22404    }
22405}
22406#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
22407#[doc = ""]
22408#[doc = "ID: 73"]
22409#[derive(Debug, Clone, PartialEq)]
22410#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22411#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22412#[cfg_attr(feature = "ts", derive(TS))]
22413#[cfg_attr(feature = "ts", ts(export))]
22414pub struct MISSION_ITEM_INT_DATA {
22415    #[doc = "PARAM1, see MAV_CMD enum"]
22416    pub param1: f32,
22417    #[doc = "PARAM2, see MAV_CMD enum"]
22418    pub param2: f32,
22419    #[doc = "PARAM3, see MAV_CMD enum"]
22420    pub param3: f32,
22421    #[doc = "PARAM4, see MAV_CMD enum"]
22422    pub param4: f32,
22423    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
22424    pub x: i32,
22425    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
22426    pub y: i32,
22427    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
22428    pub z: f32,
22429    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
22430    pub seq: u16,
22431    #[doc = "The scheduled action for the waypoint."]
22432    pub command: MavCmd,
22433    #[doc = "System ID"]
22434    pub target_system: u8,
22435    #[doc = "Component ID"]
22436    pub target_component: u8,
22437    #[doc = "The coordinate system of the waypoint."]
22438    pub frame: MavFrame,
22439    #[doc = "false:0, true:1"]
22440    pub current: u8,
22441    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
22442    pub autocontinue: u8,
22443    #[doc = "Mission type."]
22444    #[cfg_attr(feature = "serde", serde(default))]
22445    pub mission_type: MavMissionType,
22446}
22447impl MISSION_ITEM_INT_DATA {
22448    pub const ENCODED_LEN: usize = 38usize;
22449    pub const DEFAULT: Self = Self {
22450        param1: 0.0_f32,
22451        param2: 0.0_f32,
22452        param3: 0.0_f32,
22453        param4: 0.0_f32,
22454        x: 0_i32,
22455        y: 0_i32,
22456        z: 0.0_f32,
22457        seq: 0_u16,
22458        command: MavCmd::DEFAULT,
22459        target_system: 0_u8,
22460        target_component: 0_u8,
22461        frame: MavFrame::DEFAULT,
22462        current: 0_u8,
22463        autocontinue: 0_u8,
22464        mission_type: MavMissionType::DEFAULT,
22465    };
22466    #[cfg(feature = "arbitrary")]
22467    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22468        use arbitrary::{Arbitrary, Unstructured};
22469        let mut buf = [0u8; 1024];
22470        rng.fill_bytes(&mut buf);
22471        let mut unstructured = Unstructured::new(&buf);
22472        Self::arbitrary(&mut unstructured).unwrap_or_default()
22473    }
22474}
22475impl Default for MISSION_ITEM_INT_DATA {
22476    fn default() -> Self {
22477        Self::DEFAULT.clone()
22478    }
22479}
22480impl MessageData for MISSION_ITEM_INT_DATA {
22481    type Message = MavMessage;
22482    const ID: u32 = 73u32;
22483    const NAME: &'static str = "MISSION_ITEM_INT";
22484    const EXTRA_CRC: u8 = 38u8;
22485    const ENCODED_LEN: usize = 38usize;
22486    fn deser(
22487        _version: MavlinkVersion,
22488        __input: &[u8],
22489    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22490        let avail_len = __input.len();
22491        let mut payload_buf = [0; Self::ENCODED_LEN];
22492        let mut buf = if avail_len < Self::ENCODED_LEN {
22493            payload_buf[0..avail_len].copy_from_slice(__input);
22494            Bytes::new(&payload_buf)
22495        } else {
22496            Bytes::new(__input)
22497        };
22498        let mut __struct = Self::default();
22499        __struct.param1 = buf.get_f32_le()?;
22500        __struct.param2 = buf.get_f32_le()?;
22501        __struct.param3 = buf.get_f32_le()?;
22502        __struct.param4 = buf.get_f32_le()?;
22503        __struct.x = buf.get_i32_le()?;
22504        __struct.y = buf.get_i32_le()?;
22505        __struct.z = buf.get_f32_le()?;
22506        __struct.seq = buf.get_u16_le()?;
22507        let tmp = buf.get_u16_le()?;
22508        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
22509            ::mavlink_core::error::ParserError::InvalidEnum {
22510                enum_type: "MavCmd",
22511                value: tmp as u64,
22512            },
22513        )?;
22514        __struct.target_system = buf.get_u8()?;
22515        __struct.target_component = buf.get_u8()?;
22516        let tmp = buf.get_u8()?;
22517        __struct.frame =
22518            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22519                enum_type: "MavFrame",
22520                value: tmp as u64,
22521            })?;
22522        __struct.current = buf.get_u8()?;
22523        __struct.autocontinue = buf.get_u8()?;
22524        let tmp = buf.get_u8()?;
22525        __struct.mission_type =
22526            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22527                enum_type: "MavMissionType",
22528                value: tmp as u64,
22529            })?;
22530        Ok(__struct)
22531    }
22532    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22533        let mut __tmp = BytesMut::new(bytes);
22534        #[allow(clippy::absurd_extreme_comparisons)]
22535        #[allow(unused_comparisons)]
22536        if __tmp.remaining() < Self::ENCODED_LEN {
22537            panic!(
22538                "buffer is too small (need {} bytes, but got {})",
22539                Self::ENCODED_LEN,
22540                __tmp.remaining(),
22541            )
22542        }
22543        __tmp.put_f32_le(self.param1);
22544        __tmp.put_f32_le(self.param2);
22545        __tmp.put_f32_le(self.param3);
22546        __tmp.put_f32_le(self.param4);
22547        __tmp.put_i32_le(self.x);
22548        __tmp.put_i32_le(self.y);
22549        __tmp.put_f32_le(self.z);
22550        __tmp.put_u16_le(self.seq);
22551        __tmp.put_u16_le(self.command as u16);
22552        __tmp.put_u8(self.target_system);
22553        __tmp.put_u8(self.target_component);
22554        __tmp.put_u8(self.frame as u8);
22555        __tmp.put_u8(self.current);
22556        __tmp.put_u8(self.autocontinue);
22557        if matches!(version, MavlinkVersion::V2) {
22558            __tmp.put_u8(self.mission_type as u8);
22559            let len = __tmp.len();
22560            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22561        } else {
22562            __tmp.len()
22563        }
22564    }
22565}
22566#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
22567#[doc = ""]
22568#[doc = "ID: 46"]
22569#[derive(Debug, Clone, PartialEq)]
22570#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22571#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22572#[cfg_attr(feature = "ts", derive(TS))]
22573#[cfg_attr(feature = "ts", ts(export))]
22574pub struct MISSION_ITEM_REACHED_DATA {
22575    #[doc = "Sequence"]
22576    pub seq: u16,
22577}
22578impl MISSION_ITEM_REACHED_DATA {
22579    pub const ENCODED_LEN: usize = 2usize;
22580    pub const DEFAULT: Self = Self { seq: 0_u16 };
22581    #[cfg(feature = "arbitrary")]
22582    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22583        use arbitrary::{Arbitrary, Unstructured};
22584        let mut buf = [0u8; 1024];
22585        rng.fill_bytes(&mut buf);
22586        let mut unstructured = Unstructured::new(&buf);
22587        Self::arbitrary(&mut unstructured).unwrap_or_default()
22588    }
22589}
22590impl Default for MISSION_ITEM_REACHED_DATA {
22591    fn default() -> Self {
22592        Self::DEFAULT.clone()
22593    }
22594}
22595impl MessageData for MISSION_ITEM_REACHED_DATA {
22596    type Message = MavMessage;
22597    const ID: u32 = 46u32;
22598    const NAME: &'static str = "MISSION_ITEM_REACHED";
22599    const EXTRA_CRC: u8 = 11u8;
22600    const ENCODED_LEN: usize = 2usize;
22601    fn deser(
22602        _version: MavlinkVersion,
22603        __input: &[u8],
22604    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22605        let avail_len = __input.len();
22606        let mut payload_buf = [0; Self::ENCODED_LEN];
22607        let mut buf = if avail_len < Self::ENCODED_LEN {
22608            payload_buf[0..avail_len].copy_from_slice(__input);
22609            Bytes::new(&payload_buf)
22610        } else {
22611            Bytes::new(__input)
22612        };
22613        let mut __struct = Self::default();
22614        __struct.seq = buf.get_u16_le()?;
22615        Ok(__struct)
22616    }
22617    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22618        let mut __tmp = BytesMut::new(bytes);
22619        #[allow(clippy::absurd_extreme_comparisons)]
22620        #[allow(unused_comparisons)]
22621        if __tmp.remaining() < Self::ENCODED_LEN {
22622            panic!(
22623                "buffer is too small (need {} bytes, but got {})",
22624                Self::ENCODED_LEN,
22625                __tmp.remaining(),
22626            )
22627        }
22628        __tmp.put_u16_le(self.seq);
22629        if matches!(version, MavlinkVersion::V2) {
22630            let len = __tmp.len();
22631            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22632        } else {
22633            __tmp.len()
22634        }
22635    }
22636}
22637#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
22638#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
22639#[doc = ""]
22640#[doc = "ID: 40"]
22641#[derive(Debug, Clone, PartialEq)]
22642#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22643#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22644#[cfg_attr(feature = "ts", derive(TS))]
22645#[cfg_attr(feature = "ts", ts(export))]
22646pub struct MISSION_REQUEST_DATA {
22647    #[doc = "Sequence"]
22648    pub seq: u16,
22649    #[doc = "System ID"]
22650    pub target_system: u8,
22651    #[doc = "Component ID"]
22652    pub target_component: u8,
22653    #[doc = "Mission type."]
22654    #[cfg_attr(feature = "serde", serde(default))]
22655    pub mission_type: MavMissionType,
22656}
22657impl MISSION_REQUEST_DATA {
22658    pub const ENCODED_LEN: usize = 5usize;
22659    pub const DEFAULT: Self = Self {
22660        seq: 0_u16,
22661        target_system: 0_u8,
22662        target_component: 0_u8,
22663        mission_type: MavMissionType::DEFAULT,
22664    };
22665    #[cfg(feature = "arbitrary")]
22666    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22667        use arbitrary::{Arbitrary, Unstructured};
22668        let mut buf = [0u8; 1024];
22669        rng.fill_bytes(&mut buf);
22670        let mut unstructured = Unstructured::new(&buf);
22671        Self::arbitrary(&mut unstructured).unwrap_or_default()
22672    }
22673}
22674impl Default for MISSION_REQUEST_DATA {
22675    fn default() -> Self {
22676        Self::DEFAULT.clone()
22677    }
22678}
22679impl MessageData for MISSION_REQUEST_DATA {
22680    type Message = MavMessage;
22681    const ID: u32 = 40u32;
22682    const NAME: &'static str = "MISSION_REQUEST";
22683    const EXTRA_CRC: u8 = 230u8;
22684    const ENCODED_LEN: usize = 5usize;
22685    fn deser(
22686        _version: MavlinkVersion,
22687        __input: &[u8],
22688    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22689        let avail_len = __input.len();
22690        let mut payload_buf = [0; Self::ENCODED_LEN];
22691        let mut buf = if avail_len < Self::ENCODED_LEN {
22692            payload_buf[0..avail_len].copy_from_slice(__input);
22693            Bytes::new(&payload_buf)
22694        } else {
22695            Bytes::new(__input)
22696        };
22697        let mut __struct = Self::default();
22698        __struct.seq = buf.get_u16_le()?;
22699        __struct.target_system = buf.get_u8()?;
22700        __struct.target_component = buf.get_u8()?;
22701        let tmp = buf.get_u8()?;
22702        __struct.mission_type =
22703            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22704                enum_type: "MavMissionType",
22705                value: tmp as u64,
22706            })?;
22707        Ok(__struct)
22708    }
22709    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22710        let mut __tmp = BytesMut::new(bytes);
22711        #[allow(clippy::absurd_extreme_comparisons)]
22712        #[allow(unused_comparisons)]
22713        if __tmp.remaining() < Self::ENCODED_LEN {
22714            panic!(
22715                "buffer is too small (need {} bytes, but got {})",
22716                Self::ENCODED_LEN,
22717                __tmp.remaining(),
22718            )
22719        }
22720        __tmp.put_u16_le(self.seq);
22721        __tmp.put_u8(self.target_system);
22722        __tmp.put_u8(self.target_component);
22723        if matches!(version, MavlinkVersion::V2) {
22724            __tmp.put_u8(self.mission_type as u8);
22725            let len = __tmp.len();
22726            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22727        } else {
22728            __tmp.len()
22729        }
22730    }
22731}
22732#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
22733#[doc = ""]
22734#[doc = "ID: 51"]
22735#[derive(Debug, Clone, PartialEq)]
22736#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22737#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22738#[cfg_attr(feature = "ts", derive(TS))]
22739#[cfg_attr(feature = "ts", ts(export))]
22740pub struct MISSION_REQUEST_INT_DATA {
22741    #[doc = "Sequence"]
22742    pub seq: u16,
22743    #[doc = "System ID"]
22744    pub target_system: u8,
22745    #[doc = "Component ID"]
22746    pub target_component: u8,
22747    #[doc = "Mission type."]
22748    #[cfg_attr(feature = "serde", serde(default))]
22749    pub mission_type: MavMissionType,
22750}
22751impl MISSION_REQUEST_INT_DATA {
22752    pub const ENCODED_LEN: usize = 5usize;
22753    pub const DEFAULT: Self = Self {
22754        seq: 0_u16,
22755        target_system: 0_u8,
22756        target_component: 0_u8,
22757        mission_type: MavMissionType::DEFAULT,
22758    };
22759    #[cfg(feature = "arbitrary")]
22760    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22761        use arbitrary::{Arbitrary, Unstructured};
22762        let mut buf = [0u8; 1024];
22763        rng.fill_bytes(&mut buf);
22764        let mut unstructured = Unstructured::new(&buf);
22765        Self::arbitrary(&mut unstructured).unwrap_or_default()
22766    }
22767}
22768impl Default for MISSION_REQUEST_INT_DATA {
22769    fn default() -> Self {
22770        Self::DEFAULT.clone()
22771    }
22772}
22773impl MessageData for MISSION_REQUEST_INT_DATA {
22774    type Message = MavMessage;
22775    const ID: u32 = 51u32;
22776    const NAME: &'static str = "MISSION_REQUEST_INT";
22777    const EXTRA_CRC: u8 = 196u8;
22778    const ENCODED_LEN: usize = 5usize;
22779    fn deser(
22780        _version: MavlinkVersion,
22781        __input: &[u8],
22782    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22783        let avail_len = __input.len();
22784        let mut payload_buf = [0; Self::ENCODED_LEN];
22785        let mut buf = if avail_len < Self::ENCODED_LEN {
22786            payload_buf[0..avail_len].copy_from_slice(__input);
22787            Bytes::new(&payload_buf)
22788        } else {
22789            Bytes::new(__input)
22790        };
22791        let mut __struct = Self::default();
22792        __struct.seq = buf.get_u16_le()?;
22793        __struct.target_system = buf.get_u8()?;
22794        __struct.target_component = buf.get_u8()?;
22795        let tmp = buf.get_u8()?;
22796        __struct.mission_type =
22797            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22798                enum_type: "MavMissionType",
22799                value: tmp as u64,
22800            })?;
22801        Ok(__struct)
22802    }
22803    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22804        let mut __tmp = BytesMut::new(bytes);
22805        #[allow(clippy::absurd_extreme_comparisons)]
22806        #[allow(unused_comparisons)]
22807        if __tmp.remaining() < Self::ENCODED_LEN {
22808            panic!(
22809                "buffer is too small (need {} bytes, but got {})",
22810                Self::ENCODED_LEN,
22811                __tmp.remaining(),
22812            )
22813        }
22814        __tmp.put_u16_le(self.seq);
22815        __tmp.put_u8(self.target_system);
22816        __tmp.put_u8(self.target_component);
22817        if matches!(version, MavlinkVersion::V2) {
22818            __tmp.put_u8(self.mission_type as u8);
22819            let len = __tmp.len();
22820            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22821        } else {
22822            __tmp.len()
22823        }
22824    }
22825}
22826#[doc = "Request the overall list of mission items from the system/component."]
22827#[doc = ""]
22828#[doc = "ID: 43"]
22829#[derive(Debug, Clone, PartialEq)]
22830#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22831#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22832#[cfg_attr(feature = "ts", derive(TS))]
22833#[cfg_attr(feature = "ts", ts(export))]
22834pub struct MISSION_REQUEST_LIST_DATA {
22835    #[doc = "System ID"]
22836    pub target_system: u8,
22837    #[doc = "Component ID"]
22838    pub target_component: u8,
22839    #[doc = "Mission type."]
22840    #[cfg_attr(feature = "serde", serde(default))]
22841    pub mission_type: MavMissionType,
22842}
22843impl MISSION_REQUEST_LIST_DATA {
22844    pub const ENCODED_LEN: usize = 3usize;
22845    pub const DEFAULT: Self = Self {
22846        target_system: 0_u8,
22847        target_component: 0_u8,
22848        mission_type: MavMissionType::DEFAULT,
22849    };
22850    #[cfg(feature = "arbitrary")]
22851    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22852        use arbitrary::{Arbitrary, Unstructured};
22853        let mut buf = [0u8; 1024];
22854        rng.fill_bytes(&mut buf);
22855        let mut unstructured = Unstructured::new(&buf);
22856        Self::arbitrary(&mut unstructured).unwrap_or_default()
22857    }
22858}
22859impl Default for MISSION_REQUEST_LIST_DATA {
22860    fn default() -> Self {
22861        Self::DEFAULT.clone()
22862    }
22863}
22864impl MessageData for MISSION_REQUEST_LIST_DATA {
22865    type Message = MavMessage;
22866    const ID: u32 = 43u32;
22867    const NAME: &'static str = "MISSION_REQUEST_LIST";
22868    const EXTRA_CRC: u8 = 132u8;
22869    const ENCODED_LEN: usize = 3usize;
22870    fn deser(
22871        _version: MavlinkVersion,
22872        __input: &[u8],
22873    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22874        let avail_len = __input.len();
22875        let mut payload_buf = [0; Self::ENCODED_LEN];
22876        let mut buf = if avail_len < Self::ENCODED_LEN {
22877            payload_buf[0..avail_len].copy_from_slice(__input);
22878            Bytes::new(&payload_buf)
22879        } else {
22880            Bytes::new(__input)
22881        };
22882        let mut __struct = Self::default();
22883        __struct.target_system = buf.get_u8()?;
22884        __struct.target_component = buf.get_u8()?;
22885        let tmp = buf.get_u8()?;
22886        __struct.mission_type =
22887            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22888                enum_type: "MavMissionType",
22889                value: tmp as u64,
22890            })?;
22891        Ok(__struct)
22892    }
22893    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22894        let mut __tmp = BytesMut::new(bytes);
22895        #[allow(clippy::absurd_extreme_comparisons)]
22896        #[allow(unused_comparisons)]
22897        if __tmp.remaining() < Self::ENCODED_LEN {
22898            panic!(
22899                "buffer is too small (need {} bytes, but got {})",
22900                Self::ENCODED_LEN,
22901                __tmp.remaining(),
22902            )
22903        }
22904        __tmp.put_u8(self.target_system);
22905        __tmp.put_u8(self.target_component);
22906        if matches!(version, MavlinkVersion::V2) {
22907            __tmp.put_u8(self.mission_type as u8);
22908            let len = __tmp.len();
22909            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22910        } else {
22911            __tmp.len()
22912        }
22913    }
22914}
22915#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
22916#[doc = ""]
22917#[doc = "ID: 37"]
22918#[derive(Debug, Clone, PartialEq)]
22919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22920#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22921#[cfg_attr(feature = "ts", derive(TS))]
22922#[cfg_attr(feature = "ts", ts(export))]
22923pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
22924    #[doc = "Start index"]
22925    pub start_index: i16,
22926    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
22927    pub end_index: i16,
22928    #[doc = "System ID"]
22929    pub target_system: u8,
22930    #[doc = "Component ID"]
22931    pub target_component: u8,
22932    #[doc = "Mission type."]
22933    #[cfg_attr(feature = "serde", serde(default))]
22934    pub mission_type: MavMissionType,
22935}
22936impl MISSION_REQUEST_PARTIAL_LIST_DATA {
22937    pub const ENCODED_LEN: usize = 7usize;
22938    pub const DEFAULT: Self = Self {
22939        start_index: 0_i16,
22940        end_index: 0_i16,
22941        target_system: 0_u8,
22942        target_component: 0_u8,
22943        mission_type: MavMissionType::DEFAULT,
22944    };
22945    #[cfg(feature = "arbitrary")]
22946    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22947        use arbitrary::{Arbitrary, Unstructured};
22948        let mut buf = [0u8; 1024];
22949        rng.fill_bytes(&mut buf);
22950        let mut unstructured = Unstructured::new(&buf);
22951        Self::arbitrary(&mut unstructured).unwrap_or_default()
22952    }
22953}
22954impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
22955    fn default() -> Self {
22956        Self::DEFAULT.clone()
22957    }
22958}
22959impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
22960    type Message = MavMessage;
22961    const ID: u32 = 37u32;
22962    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
22963    const EXTRA_CRC: u8 = 212u8;
22964    const ENCODED_LEN: usize = 7usize;
22965    fn deser(
22966        _version: MavlinkVersion,
22967        __input: &[u8],
22968    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22969        let avail_len = __input.len();
22970        let mut payload_buf = [0; Self::ENCODED_LEN];
22971        let mut buf = if avail_len < Self::ENCODED_LEN {
22972            payload_buf[0..avail_len].copy_from_slice(__input);
22973            Bytes::new(&payload_buf)
22974        } else {
22975            Bytes::new(__input)
22976        };
22977        let mut __struct = Self::default();
22978        __struct.start_index = buf.get_i16_le()?;
22979        __struct.end_index = buf.get_i16_le()?;
22980        __struct.target_system = buf.get_u8()?;
22981        __struct.target_component = buf.get_u8()?;
22982        let tmp = buf.get_u8()?;
22983        __struct.mission_type =
22984            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22985                enum_type: "MavMissionType",
22986                value: tmp as u64,
22987            })?;
22988        Ok(__struct)
22989    }
22990    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22991        let mut __tmp = BytesMut::new(bytes);
22992        #[allow(clippy::absurd_extreme_comparisons)]
22993        #[allow(unused_comparisons)]
22994        if __tmp.remaining() < Self::ENCODED_LEN {
22995            panic!(
22996                "buffer is too small (need {} bytes, but got {})",
22997                Self::ENCODED_LEN,
22998                __tmp.remaining(),
22999            )
23000        }
23001        __tmp.put_i16_le(self.start_index);
23002        __tmp.put_i16_le(self.end_index);
23003        __tmp.put_u8(self.target_system);
23004        __tmp.put_u8(self.target_component);
23005        if matches!(version, MavlinkVersion::V2) {
23006            __tmp.put_u8(self.mission_type as u8);
23007            let len = __tmp.len();
23008            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23009        } else {
23010            __tmp.len()
23011        }
23012    }
23013}
23014#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
23015#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
23016#[doc = ""]
23017#[doc = "ID: 41"]
23018#[derive(Debug, Clone, PartialEq)]
23019#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23020#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23021#[cfg_attr(feature = "ts", derive(TS))]
23022#[cfg_attr(feature = "ts", ts(export))]
23023pub struct MISSION_SET_CURRENT_DATA {
23024    #[doc = "Sequence"]
23025    pub seq: u16,
23026    #[doc = "System ID"]
23027    pub target_system: u8,
23028    #[doc = "Component ID"]
23029    pub target_component: u8,
23030}
23031impl MISSION_SET_CURRENT_DATA {
23032    pub const ENCODED_LEN: usize = 4usize;
23033    pub const DEFAULT: Self = Self {
23034        seq: 0_u16,
23035        target_system: 0_u8,
23036        target_component: 0_u8,
23037    };
23038    #[cfg(feature = "arbitrary")]
23039    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23040        use arbitrary::{Arbitrary, Unstructured};
23041        let mut buf = [0u8; 1024];
23042        rng.fill_bytes(&mut buf);
23043        let mut unstructured = Unstructured::new(&buf);
23044        Self::arbitrary(&mut unstructured).unwrap_or_default()
23045    }
23046}
23047impl Default for MISSION_SET_CURRENT_DATA {
23048    fn default() -> Self {
23049        Self::DEFAULT.clone()
23050    }
23051}
23052impl MessageData for MISSION_SET_CURRENT_DATA {
23053    type Message = MavMessage;
23054    const ID: u32 = 41u32;
23055    const NAME: &'static str = "MISSION_SET_CURRENT";
23056    const EXTRA_CRC: u8 = 28u8;
23057    const ENCODED_LEN: usize = 4usize;
23058    fn deser(
23059        _version: MavlinkVersion,
23060        __input: &[u8],
23061    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23062        let avail_len = __input.len();
23063        let mut payload_buf = [0; Self::ENCODED_LEN];
23064        let mut buf = if avail_len < Self::ENCODED_LEN {
23065            payload_buf[0..avail_len].copy_from_slice(__input);
23066            Bytes::new(&payload_buf)
23067        } else {
23068            Bytes::new(__input)
23069        };
23070        let mut __struct = Self::default();
23071        __struct.seq = buf.get_u16_le()?;
23072        __struct.target_system = buf.get_u8()?;
23073        __struct.target_component = buf.get_u8()?;
23074        Ok(__struct)
23075    }
23076    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23077        let mut __tmp = BytesMut::new(bytes);
23078        #[allow(clippy::absurd_extreme_comparisons)]
23079        #[allow(unused_comparisons)]
23080        if __tmp.remaining() < Self::ENCODED_LEN {
23081            panic!(
23082                "buffer is too small (need {} bytes, but got {})",
23083                Self::ENCODED_LEN,
23084                __tmp.remaining(),
23085            )
23086        }
23087        __tmp.put_u16_le(self.seq);
23088        __tmp.put_u8(self.target_system);
23089        __tmp.put_u8(self.target_component);
23090        if matches!(version, MavlinkVersion::V2) {
23091            let len = __tmp.len();
23092            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23093        } else {
23094            __tmp.len()
23095        }
23096    }
23097}
23098#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
23099#[doc = ""]
23100#[doc = "ID: 38"]
23101#[derive(Debug, Clone, PartialEq)]
23102#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23103#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23104#[cfg_attr(feature = "ts", derive(TS))]
23105#[cfg_attr(feature = "ts", ts(export))]
23106pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
23107    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
23108    pub start_index: i16,
23109    #[doc = "End index, equal or greater than start index."]
23110    pub end_index: i16,
23111    #[doc = "System ID"]
23112    pub target_system: u8,
23113    #[doc = "Component ID"]
23114    pub target_component: u8,
23115    #[doc = "Mission type."]
23116    #[cfg_attr(feature = "serde", serde(default))]
23117    pub mission_type: MavMissionType,
23118}
23119impl MISSION_WRITE_PARTIAL_LIST_DATA {
23120    pub const ENCODED_LEN: usize = 7usize;
23121    pub const DEFAULT: Self = Self {
23122        start_index: 0_i16,
23123        end_index: 0_i16,
23124        target_system: 0_u8,
23125        target_component: 0_u8,
23126        mission_type: MavMissionType::DEFAULT,
23127    };
23128    #[cfg(feature = "arbitrary")]
23129    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23130        use arbitrary::{Arbitrary, Unstructured};
23131        let mut buf = [0u8; 1024];
23132        rng.fill_bytes(&mut buf);
23133        let mut unstructured = Unstructured::new(&buf);
23134        Self::arbitrary(&mut unstructured).unwrap_or_default()
23135    }
23136}
23137impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
23138    fn default() -> Self {
23139        Self::DEFAULT.clone()
23140    }
23141}
23142impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
23143    type Message = MavMessage;
23144    const ID: u32 = 38u32;
23145    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
23146    const EXTRA_CRC: u8 = 9u8;
23147    const ENCODED_LEN: usize = 7usize;
23148    fn deser(
23149        _version: MavlinkVersion,
23150        __input: &[u8],
23151    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23152        let avail_len = __input.len();
23153        let mut payload_buf = [0; Self::ENCODED_LEN];
23154        let mut buf = if avail_len < Self::ENCODED_LEN {
23155            payload_buf[0..avail_len].copy_from_slice(__input);
23156            Bytes::new(&payload_buf)
23157        } else {
23158            Bytes::new(__input)
23159        };
23160        let mut __struct = Self::default();
23161        __struct.start_index = buf.get_i16_le()?;
23162        __struct.end_index = buf.get_i16_le()?;
23163        __struct.target_system = buf.get_u8()?;
23164        __struct.target_component = buf.get_u8()?;
23165        let tmp = buf.get_u8()?;
23166        __struct.mission_type =
23167            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23168                enum_type: "MavMissionType",
23169                value: tmp as u64,
23170            })?;
23171        Ok(__struct)
23172    }
23173    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23174        let mut __tmp = BytesMut::new(bytes);
23175        #[allow(clippy::absurd_extreme_comparisons)]
23176        #[allow(unused_comparisons)]
23177        if __tmp.remaining() < Self::ENCODED_LEN {
23178            panic!(
23179                "buffer is too small (need {} bytes, but got {})",
23180                Self::ENCODED_LEN,
23181                __tmp.remaining(),
23182            )
23183        }
23184        __tmp.put_i16_le(self.start_index);
23185        __tmp.put_i16_le(self.end_index);
23186        __tmp.put_u8(self.target_system);
23187        __tmp.put_u8(self.target_component);
23188        if matches!(version, MavlinkVersion::V2) {
23189            __tmp.put_u8(self.mission_type as u8);
23190            let len = __tmp.len();
23191            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23192        } else {
23193            __tmp.len()
23194        }
23195    }
23196}
23197#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
23198#[doc = "Orientation of a mount."]
23199#[doc = ""]
23200#[doc = "ID: 265"]
23201#[derive(Debug, Clone, PartialEq)]
23202#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23203#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23204#[cfg_attr(feature = "ts", derive(TS))]
23205#[cfg_attr(feature = "ts", ts(export))]
23206pub struct MOUNT_ORIENTATION_DATA {
23207    #[doc = "Timestamp (time since system boot)."]
23208    pub time_boot_ms: u32,
23209    #[doc = "Roll in global frame (set to NaN for invalid)."]
23210    pub roll: f32,
23211    #[doc = "Pitch in global frame (set to NaN for invalid)."]
23212    pub pitch: f32,
23213    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
23214    pub yaw: f32,
23215    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
23216    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23217    pub yaw_absolute: f32,
23218}
23219impl MOUNT_ORIENTATION_DATA {
23220    pub const ENCODED_LEN: usize = 20usize;
23221    pub const DEFAULT: Self = Self {
23222        time_boot_ms: 0_u32,
23223        roll: 0.0_f32,
23224        pitch: 0.0_f32,
23225        yaw: 0.0_f32,
23226        yaw_absolute: 0.0_f32,
23227    };
23228    #[cfg(feature = "arbitrary")]
23229    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23230        use arbitrary::{Arbitrary, Unstructured};
23231        let mut buf = [0u8; 1024];
23232        rng.fill_bytes(&mut buf);
23233        let mut unstructured = Unstructured::new(&buf);
23234        Self::arbitrary(&mut unstructured).unwrap_or_default()
23235    }
23236}
23237impl Default for MOUNT_ORIENTATION_DATA {
23238    fn default() -> Self {
23239        Self::DEFAULT.clone()
23240    }
23241}
23242impl MessageData for MOUNT_ORIENTATION_DATA {
23243    type Message = MavMessage;
23244    const ID: u32 = 265u32;
23245    const NAME: &'static str = "MOUNT_ORIENTATION";
23246    const EXTRA_CRC: u8 = 26u8;
23247    const ENCODED_LEN: usize = 20usize;
23248    fn deser(
23249        _version: MavlinkVersion,
23250        __input: &[u8],
23251    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23252        let avail_len = __input.len();
23253        let mut payload_buf = [0; Self::ENCODED_LEN];
23254        let mut buf = if avail_len < Self::ENCODED_LEN {
23255            payload_buf[0..avail_len].copy_from_slice(__input);
23256            Bytes::new(&payload_buf)
23257        } else {
23258            Bytes::new(__input)
23259        };
23260        let mut __struct = Self::default();
23261        __struct.time_boot_ms = buf.get_u32_le()?;
23262        __struct.roll = buf.get_f32_le()?;
23263        __struct.pitch = buf.get_f32_le()?;
23264        __struct.yaw = buf.get_f32_le()?;
23265        __struct.yaw_absolute = buf.get_f32_le()?;
23266        Ok(__struct)
23267    }
23268    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23269        let mut __tmp = BytesMut::new(bytes);
23270        #[allow(clippy::absurd_extreme_comparisons)]
23271        #[allow(unused_comparisons)]
23272        if __tmp.remaining() < Self::ENCODED_LEN {
23273            panic!(
23274                "buffer is too small (need {} bytes, but got {})",
23275                Self::ENCODED_LEN,
23276                __tmp.remaining(),
23277            )
23278        }
23279        __tmp.put_u32_le(self.time_boot_ms);
23280        __tmp.put_f32_le(self.roll);
23281        __tmp.put_f32_le(self.pitch);
23282        __tmp.put_f32_le(self.yaw);
23283        if matches!(version, MavlinkVersion::V2) {
23284            __tmp.put_f32_le(self.yaw_absolute);
23285            let len = __tmp.len();
23286            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23287        } else {
23288            __tmp.len()
23289        }
23290    }
23291}
23292#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
23293#[doc = ""]
23294#[doc = "ID: 251"]
23295#[derive(Debug, Clone, PartialEq)]
23296#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23297#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23298#[cfg_attr(feature = "ts", derive(TS))]
23299#[cfg_attr(feature = "ts", ts(export))]
23300pub struct NAMED_VALUE_FLOAT_DATA {
23301    #[doc = "Timestamp (time since system boot)."]
23302    pub time_boot_ms: u32,
23303    #[doc = "Floating point value"]
23304    pub value: f32,
23305    #[doc = "Name of the debug variable"]
23306    #[cfg_attr(feature = "ts", ts(type = "string"))]
23307    pub name: CharArray<10>,
23308}
23309impl NAMED_VALUE_FLOAT_DATA {
23310    pub const ENCODED_LEN: usize = 18usize;
23311    pub const DEFAULT: Self = Self {
23312        time_boot_ms: 0_u32,
23313        value: 0.0_f32,
23314        name: CharArray::new([0_u8; 10usize]),
23315    };
23316    #[cfg(feature = "arbitrary")]
23317    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23318        use arbitrary::{Arbitrary, Unstructured};
23319        let mut buf = [0u8; 1024];
23320        rng.fill_bytes(&mut buf);
23321        let mut unstructured = Unstructured::new(&buf);
23322        Self::arbitrary(&mut unstructured).unwrap_or_default()
23323    }
23324}
23325impl Default for NAMED_VALUE_FLOAT_DATA {
23326    fn default() -> Self {
23327        Self::DEFAULT.clone()
23328    }
23329}
23330impl MessageData for NAMED_VALUE_FLOAT_DATA {
23331    type Message = MavMessage;
23332    const ID: u32 = 251u32;
23333    const NAME: &'static str = "NAMED_VALUE_FLOAT";
23334    const EXTRA_CRC: u8 = 170u8;
23335    const ENCODED_LEN: usize = 18usize;
23336    fn deser(
23337        _version: MavlinkVersion,
23338        __input: &[u8],
23339    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23340        let avail_len = __input.len();
23341        let mut payload_buf = [0; Self::ENCODED_LEN];
23342        let mut buf = if avail_len < Self::ENCODED_LEN {
23343            payload_buf[0..avail_len].copy_from_slice(__input);
23344            Bytes::new(&payload_buf)
23345        } else {
23346            Bytes::new(__input)
23347        };
23348        let mut __struct = Self::default();
23349        __struct.time_boot_ms = buf.get_u32_le()?;
23350        __struct.value = buf.get_f32_le()?;
23351        let mut tmp = [0_u8; 10usize];
23352        for v in &mut tmp {
23353            *v = buf.get_u8()?;
23354        }
23355        __struct.name = CharArray::new(tmp);
23356        Ok(__struct)
23357    }
23358    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23359        let mut __tmp = BytesMut::new(bytes);
23360        #[allow(clippy::absurd_extreme_comparisons)]
23361        #[allow(unused_comparisons)]
23362        if __tmp.remaining() < Self::ENCODED_LEN {
23363            panic!(
23364                "buffer is too small (need {} bytes, but got {})",
23365                Self::ENCODED_LEN,
23366                __tmp.remaining(),
23367            )
23368        }
23369        __tmp.put_u32_le(self.time_boot_ms);
23370        __tmp.put_f32_le(self.value);
23371        for val in &self.name {
23372            __tmp.put_u8(*val);
23373        }
23374        if matches!(version, MavlinkVersion::V2) {
23375            let len = __tmp.len();
23376            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23377        } else {
23378            __tmp.len()
23379        }
23380    }
23381}
23382#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
23383#[doc = ""]
23384#[doc = "ID: 252"]
23385#[derive(Debug, Clone, PartialEq)]
23386#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23387#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23388#[cfg_attr(feature = "ts", derive(TS))]
23389#[cfg_attr(feature = "ts", ts(export))]
23390pub struct NAMED_VALUE_INT_DATA {
23391    #[doc = "Timestamp (time since system boot)."]
23392    pub time_boot_ms: u32,
23393    #[doc = "Signed integer value"]
23394    pub value: i32,
23395    #[doc = "Name of the debug variable"]
23396    #[cfg_attr(feature = "ts", ts(type = "string"))]
23397    pub name: CharArray<10>,
23398}
23399impl NAMED_VALUE_INT_DATA {
23400    pub const ENCODED_LEN: usize = 18usize;
23401    pub const DEFAULT: Self = Self {
23402        time_boot_ms: 0_u32,
23403        value: 0_i32,
23404        name: CharArray::new([0_u8; 10usize]),
23405    };
23406    #[cfg(feature = "arbitrary")]
23407    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23408        use arbitrary::{Arbitrary, Unstructured};
23409        let mut buf = [0u8; 1024];
23410        rng.fill_bytes(&mut buf);
23411        let mut unstructured = Unstructured::new(&buf);
23412        Self::arbitrary(&mut unstructured).unwrap_or_default()
23413    }
23414}
23415impl Default for NAMED_VALUE_INT_DATA {
23416    fn default() -> Self {
23417        Self::DEFAULT.clone()
23418    }
23419}
23420impl MessageData for NAMED_VALUE_INT_DATA {
23421    type Message = MavMessage;
23422    const ID: u32 = 252u32;
23423    const NAME: &'static str = "NAMED_VALUE_INT";
23424    const EXTRA_CRC: u8 = 44u8;
23425    const ENCODED_LEN: usize = 18usize;
23426    fn deser(
23427        _version: MavlinkVersion,
23428        __input: &[u8],
23429    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23430        let avail_len = __input.len();
23431        let mut payload_buf = [0; Self::ENCODED_LEN];
23432        let mut buf = if avail_len < Self::ENCODED_LEN {
23433            payload_buf[0..avail_len].copy_from_slice(__input);
23434            Bytes::new(&payload_buf)
23435        } else {
23436            Bytes::new(__input)
23437        };
23438        let mut __struct = Self::default();
23439        __struct.time_boot_ms = buf.get_u32_le()?;
23440        __struct.value = buf.get_i32_le()?;
23441        let mut tmp = [0_u8; 10usize];
23442        for v in &mut tmp {
23443            *v = buf.get_u8()?;
23444        }
23445        __struct.name = CharArray::new(tmp);
23446        Ok(__struct)
23447    }
23448    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23449        let mut __tmp = BytesMut::new(bytes);
23450        #[allow(clippy::absurd_extreme_comparisons)]
23451        #[allow(unused_comparisons)]
23452        if __tmp.remaining() < Self::ENCODED_LEN {
23453            panic!(
23454                "buffer is too small (need {} bytes, but got {})",
23455                Self::ENCODED_LEN,
23456                __tmp.remaining(),
23457            )
23458        }
23459        __tmp.put_u32_le(self.time_boot_ms);
23460        __tmp.put_i32_le(self.value);
23461        for val in &self.name {
23462            __tmp.put_u8(*val);
23463        }
23464        if matches!(version, MavlinkVersion::V2) {
23465            let len = __tmp.len();
23466            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23467        } else {
23468            __tmp.len()
23469        }
23470    }
23471}
23472#[doc = "The state of the navigation and position controller."]
23473#[doc = ""]
23474#[doc = "ID: 62"]
23475#[derive(Debug, Clone, PartialEq)]
23476#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23477#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23478#[cfg_attr(feature = "ts", derive(TS))]
23479#[cfg_attr(feature = "ts", ts(export))]
23480pub struct NAV_CONTROLLER_OUTPUT_DATA {
23481    #[doc = "Current desired roll"]
23482    pub nav_roll: f32,
23483    #[doc = "Current desired pitch"]
23484    pub nav_pitch: f32,
23485    #[doc = "Current altitude error"]
23486    pub alt_error: f32,
23487    #[doc = "Current airspeed error"]
23488    pub aspd_error: f32,
23489    #[doc = "Current crosstrack error on x-y plane"]
23490    pub xtrack_error: f32,
23491    #[doc = "Current desired heading"]
23492    pub nav_bearing: i16,
23493    #[doc = "Bearing to current waypoint/target"]
23494    pub target_bearing: i16,
23495    #[doc = "Distance to active waypoint"]
23496    pub wp_dist: u16,
23497}
23498impl NAV_CONTROLLER_OUTPUT_DATA {
23499    pub const ENCODED_LEN: usize = 26usize;
23500    pub const DEFAULT: Self = Self {
23501        nav_roll: 0.0_f32,
23502        nav_pitch: 0.0_f32,
23503        alt_error: 0.0_f32,
23504        aspd_error: 0.0_f32,
23505        xtrack_error: 0.0_f32,
23506        nav_bearing: 0_i16,
23507        target_bearing: 0_i16,
23508        wp_dist: 0_u16,
23509    };
23510    #[cfg(feature = "arbitrary")]
23511    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23512        use arbitrary::{Arbitrary, Unstructured};
23513        let mut buf = [0u8; 1024];
23514        rng.fill_bytes(&mut buf);
23515        let mut unstructured = Unstructured::new(&buf);
23516        Self::arbitrary(&mut unstructured).unwrap_or_default()
23517    }
23518}
23519impl Default for NAV_CONTROLLER_OUTPUT_DATA {
23520    fn default() -> Self {
23521        Self::DEFAULT.clone()
23522    }
23523}
23524impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
23525    type Message = MavMessage;
23526    const ID: u32 = 62u32;
23527    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
23528    const EXTRA_CRC: u8 = 183u8;
23529    const ENCODED_LEN: usize = 26usize;
23530    fn deser(
23531        _version: MavlinkVersion,
23532        __input: &[u8],
23533    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23534        let avail_len = __input.len();
23535        let mut payload_buf = [0; Self::ENCODED_LEN];
23536        let mut buf = if avail_len < Self::ENCODED_LEN {
23537            payload_buf[0..avail_len].copy_from_slice(__input);
23538            Bytes::new(&payload_buf)
23539        } else {
23540            Bytes::new(__input)
23541        };
23542        let mut __struct = Self::default();
23543        __struct.nav_roll = buf.get_f32_le()?;
23544        __struct.nav_pitch = buf.get_f32_le()?;
23545        __struct.alt_error = buf.get_f32_le()?;
23546        __struct.aspd_error = buf.get_f32_le()?;
23547        __struct.xtrack_error = buf.get_f32_le()?;
23548        __struct.nav_bearing = buf.get_i16_le()?;
23549        __struct.target_bearing = buf.get_i16_le()?;
23550        __struct.wp_dist = buf.get_u16_le()?;
23551        Ok(__struct)
23552    }
23553    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23554        let mut __tmp = BytesMut::new(bytes);
23555        #[allow(clippy::absurd_extreme_comparisons)]
23556        #[allow(unused_comparisons)]
23557        if __tmp.remaining() < Self::ENCODED_LEN {
23558            panic!(
23559                "buffer is too small (need {} bytes, but got {})",
23560                Self::ENCODED_LEN,
23561                __tmp.remaining(),
23562            )
23563        }
23564        __tmp.put_f32_le(self.nav_roll);
23565        __tmp.put_f32_le(self.nav_pitch);
23566        __tmp.put_f32_le(self.alt_error);
23567        __tmp.put_f32_le(self.aspd_error);
23568        __tmp.put_f32_le(self.xtrack_error);
23569        __tmp.put_i16_le(self.nav_bearing);
23570        __tmp.put_i16_le(self.target_bearing);
23571        __tmp.put_u16_le(self.wp_dist);
23572        if matches!(version, MavlinkVersion::V2) {
23573            let len = __tmp.len();
23574            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23575        } else {
23576            __tmp.len()
23577        }
23578    }
23579}
23580#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
23581#[doc = ""]
23582#[doc = "ID: 330"]
23583#[derive(Debug, Clone, PartialEq)]
23584#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23585#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23586#[cfg_attr(feature = "ts", derive(TS))]
23587#[cfg_attr(feature = "ts", ts(export))]
23588pub struct OBSTACLE_DISTANCE_DATA {
23589    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23590    pub time_usec: u64,
23591    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
23592    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23593    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23594    pub distances: [u16; 72],
23595    #[doc = "Minimum distance the sensor can measure."]
23596    pub min_distance: u16,
23597    #[doc = "Maximum distance the sensor can measure."]
23598    pub max_distance: u16,
23599    #[doc = "Class id of the distance sensor type."]
23600    pub sensor_type: MavDistanceSensor,
23601    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
23602    pub increment: u8,
23603    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
23604    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23605    pub increment_f: f32,
23606    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
23607    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23608    pub angle_offset: f32,
23609    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
23610    #[cfg_attr(feature = "serde", serde(default))]
23611    pub frame: MavFrame,
23612}
23613impl OBSTACLE_DISTANCE_DATA {
23614    pub const ENCODED_LEN: usize = 167usize;
23615    pub const DEFAULT: Self = Self {
23616        time_usec: 0_u64,
23617        distances: [0_u16; 72usize],
23618        min_distance: 0_u16,
23619        max_distance: 0_u16,
23620        sensor_type: MavDistanceSensor::DEFAULT,
23621        increment: 0_u8,
23622        increment_f: 0.0_f32,
23623        angle_offset: 0.0_f32,
23624        frame: MavFrame::DEFAULT,
23625    };
23626    #[cfg(feature = "arbitrary")]
23627    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23628        use arbitrary::{Arbitrary, Unstructured};
23629        let mut buf = [0u8; 1024];
23630        rng.fill_bytes(&mut buf);
23631        let mut unstructured = Unstructured::new(&buf);
23632        Self::arbitrary(&mut unstructured).unwrap_or_default()
23633    }
23634}
23635impl Default for OBSTACLE_DISTANCE_DATA {
23636    fn default() -> Self {
23637        Self::DEFAULT.clone()
23638    }
23639}
23640impl MessageData for OBSTACLE_DISTANCE_DATA {
23641    type Message = MavMessage;
23642    const ID: u32 = 330u32;
23643    const NAME: &'static str = "OBSTACLE_DISTANCE";
23644    const EXTRA_CRC: u8 = 23u8;
23645    const ENCODED_LEN: usize = 167usize;
23646    fn deser(
23647        _version: MavlinkVersion,
23648        __input: &[u8],
23649    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23650        let avail_len = __input.len();
23651        let mut payload_buf = [0; Self::ENCODED_LEN];
23652        let mut buf = if avail_len < Self::ENCODED_LEN {
23653            payload_buf[0..avail_len].copy_from_slice(__input);
23654            Bytes::new(&payload_buf)
23655        } else {
23656            Bytes::new(__input)
23657        };
23658        let mut __struct = Self::default();
23659        __struct.time_usec = buf.get_u64_le()?;
23660        for v in &mut __struct.distances {
23661            let val = buf.get_u16_le()?;
23662            *v = val;
23663        }
23664        __struct.min_distance = buf.get_u16_le()?;
23665        __struct.max_distance = buf.get_u16_le()?;
23666        let tmp = buf.get_u8()?;
23667        __struct.sensor_type =
23668            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23669                enum_type: "MavDistanceSensor",
23670                value: tmp as u64,
23671            })?;
23672        __struct.increment = buf.get_u8()?;
23673        __struct.increment_f = buf.get_f32_le()?;
23674        __struct.angle_offset = buf.get_f32_le()?;
23675        let tmp = buf.get_u8()?;
23676        __struct.frame =
23677            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23678                enum_type: "MavFrame",
23679                value: tmp as u64,
23680            })?;
23681        Ok(__struct)
23682    }
23683    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23684        let mut __tmp = BytesMut::new(bytes);
23685        #[allow(clippy::absurd_extreme_comparisons)]
23686        #[allow(unused_comparisons)]
23687        if __tmp.remaining() < Self::ENCODED_LEN {
23688            panic!(
23689                "buffer is too small (need {} bytes, but got {})",
23690                Self::ENCODED_LEN,
23691                __tmp.remaining(),
23692            )
23693        }
23694        __tmp.put_u64_le(self.time_usec);
23695        for val in &self.distances {
23696            __tmp.put_u16_le(*val);
23697        }
23698        __tmp.put_u16_le(self.min_distance);
23699        __tmp.put_u16_le(self.max_distance);
23700        __tmp.put_u8(self.sensor_type as u8);
23701        __tmp.put_u8(self.increment);
23702        if matches!(version, MavlinkVersion::V2) {
23703            __tmp.put_f32_le(self.increment_f);
23704            __tmp.put_f32_le(self.angle_offset);
23705            __tmp.put_u8(self.frame as u8);
23706            let len = __tmp.len();
23707            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23708        } else {
23709            __tmp.len()
23710        }
23711    }
23712}
23713#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
23714#[doc = ""]
23715#[doc = "ID: 331"]
23716#[derive(Debug, Clone, PartialEq)]
23717#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23718#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23719#[cfg_attr(feature = "ts", derive(TS))]
23720#[cfg_attr(feature = "ts", ts(export))]
23721pub struct ODOMETRY_DATA {
23722    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23723    pub time_usec: u64,
23724    #[doc = "X Position"]
23725    pub x: f32,
23726    #[doc = "Y Position"]
23727    pub y: f32,
23728    #[doc = "Z Position"]
23729    pub z: f32,
23730    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
23731    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23732    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23733    pub q: [f32; 4],
23734    #[doc = "X linear speed"]
23735    pub vx: f32,
23736    #[doc = "Y linear speed"]
23737    pub vy: f32,
23738    #[doc = "Z linear speed"]
23739    pub vz: f32,
23740    #[doc = "Roll angular speed"]
23741    pub rollspeed: f32,
23742    #[doc = "Pitch angular speed"]
23743    pub pitchspeed: f32,
23744    #[doc = "Yaw angular speed"]
23745    pub yawspeed: f32,
23746    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
23747    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23748    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23749    pub pose_covariance: [f32; 21],
23750    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
23751    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23752    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23753    pub velocity_covariance: [f32; 21],
23754    #[doc = "Coordinate frame of reference for the pose data."]
23755    pub frame_id: MavFrame,
23756    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
23757    pub child_frame_id: MavFrame,
23758    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
23759    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23760    pub reset_counter: u8,
23761    #[doc = "Type of estimator that is providing the odometry."]
23762    #[cfg_attr(feature = "serde", serde(default))]
23763    pub estimator_type: MavEstimatorType,
23764    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
23765    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23766    pub quality: i8,
23767}
23768impl ODOMETRY_DATA {
23769    pub const ENCODED_LEN: usize = 233usize;
23770    pub const DEFAULT: Self = Self {
23771        time_usec: 0_u64,
23772        x: 0.0_f32,
23773        y: 0.0_f32,
23774        z: 0.0_f32,
23775        q: [0.0_f32; 4usize],
23776        vx: 0.0_f32,
23777        vy: 0.0_f32,
23778        vz: 0.0_f32,
23779        rollspeed: 0.0_f32,
23780        pitchspeed: 0.0_f32,
23781        yawspeed: 0.0_f32,
23782        pose_covariance: [0.0_f32; 21usize],
23783        velocity_covariance: [0.0_f32; 21usize],
23784        frame_id: MavFrame::DEFAULT,
23785        child_frame_id: MavFrame::DEFAULT,
23786        reset_counter: 0_u8,
23787        estimator_type: MavEstimatorType::DEFAULT,
23788        quality: 0_i8,
23789    };
23790    #[cfg(feature = "arbitrary")]
23791    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23792        use arbitrary::{Arbitrary, Unstructured};
23793        let mut buf = [0u8; 1024];
23794        rng.fill_bytes(&mut buf);
23795        let mut unstructured = Unstructured::new(&buf);
23796        Self::arbitrary(&mut unstructured).unwrap_or_default()
23797    }
23798}
23799impl Default for ODOMETRY_DATA {
23800    fn default() -> Self {
23801        Self::DEFAULT.clone()
23802    }
23803}
23804impl MessageData for ODOMETRY_DATA {
23805    type Message = MavMessage;
23806    const ID: u32 = 331u32;
23807    const NAME: &'static str = "ODOMETRY";
23808    const EXTRA_CRC: u8 = 91u8;
23809    const ENCODED_LEN: usize = 233usize;
23810    fn deser(
23811        _version: MavlinkVersion,
23812        __input: &[u8],
23813    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23814        let avail_len = __input.len();
23815        let mut payload_buf = [0; Self::ENCODED_LEN];
23816        let mut buf = if avail_len < Self::ENCODED_LEN {
23817            payload_buf[0..avail_len].copy_from_slice(__input);
23818            Bytes::new(&payload_buf)
23819        } else {
23820            Bytes::new(__input)
23821        };
23822        let mut __struct = Self::default();
23823        __struct.time_usec = buf.get_u64_le()?;
23824        __struct.x = buf.get_f32_le()?;
23825        __struct.y = buf.get_f32_le()?;
23826        __struct.z = buf.get_f32_le()?;
23827        for v in &mut __struct.q {
23828            let val = buf.get_f32_le()?;
23829            *v = val;
23830        }
23831        __struct.vx = buf.get_f32_le()?;
23832        __struct.vy = buf.get_f32_le()?;
23833        __struct.vz = buf.get_f32_le()?;
23834        __struct.rollspeed = buf.get_f32_le()?;
23835        __struct.pitchspeed = buf.get_f32_le()?;
23836        __struct.yawspeed = buf.get_f32_le()?;
23837        for v in &mut __struct.pose_covariance {
23838            let val = buf.get_f32_le()?;
23839            *v = val;
23840        }
23841        for v in &mut __struct.velocity_covariance {
23842            let val = buf.get_f32_le()?;
23843            *v = val;
23844        }
23845        let tmp = buf.get_u8()?;
23846        __struct.frame_id =
23847            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23848                enum_type: "MavFrame",
23849                value: tmp as u64,
23850            })?;
23851        let tmp = buf.get_u8()?;
23852        __struct.child_frame_id =
23853            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23854                enum_type: "MavFrame",
23855                value: tmp as u64,
23856            })?;
23857        __struct.reset_counter = buf.get_u8()?;
23858        let tmp = buf.get_u8()?;
23859        __struct.estimator_type =
23860            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23861                enum_type: "MavEstimatorType",
23862                value: tmp as u64,
23863            })?;
23864        __struct.quality = buf.get_i8()?;
23865        Ok(__struct)
23866    }
23867    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23868        let mut __tmp = BytesMut::new(bytes);
23869        #[allow(clippy::absurd_extreme_comparisons)]
23870        #[allow(unused_comparisons)]
23871        if __tmp.remaining() < Self::ENCODED_LEN {
23872            panic!(
23873                "buffer is too small (need {} bytes, but got {})",
23874                Self::ENCODED_LEN,
23875                __tmp.remaining(),
23876            )
23877        }
23878        __tmp.put_u64_le(self.time_usec);
23879        __tmp.put_f32_le(self.x);
23880        __tmp.put_f32_le(self.y);
23881        __tmp.put_f32_le(self.z);
23882        for val in &self.q {
23883            __tmp.put_f32_le(*val);
23884        }
23885        __tmp.put_f32_le(self.vx);
23886        __tmp.put_f32_le(self.vy);
23887        __tmp.put_f32_le(self.vz);
23888        __tmp.put_f32_le(self.rollspeed);
23889        __tmp.put_f32_le(self.pitchspeed);
23890        __tmp.put_f32_le(self.yawspeed);
23891        for val in &self.pose_covariance {
23892            __tmp.put_f32_le(*val);
23893        }
23894        for val in &self.velocity_covariance {
23895            __tmp.put_f32_le(*val);
23896        }
23897        __tmp.put_u8(self.frame_id as u8);
23898        __tmp.put_u8(self.child_frame_id as u8);
23899        if matches!(version, MavlinkVersion::V2) {
23900            __tmp.put_u8(self.reset_counter);
23901            __tmp.put_u8(self.estimator_type as u8);
23902            __tmp.put_i8(self.quality);
23903            let len = __tmp.len();
23904            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23905        } else {
23906            __tmp.len()
23907        }
23908    }
23909}
23910#[doc = "Hardware status sent by an onboard computer."]
23911#[doc = ""]
23912#[doc = "ID: 390"]
23913#[derive(Debug, Clone, PartialEq)]
23914#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23915#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23916#[cfg_attr(feature = "ts", derive(TS))]
23917#[cfg_attr(feature = "ts", ts(export))]
23918pub struct ONBOARD_COMPUTER_STATUS_DATA {
23919    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23920    pub time_usec: u64,
23921    #[doc = "Time since system boot."]
23922    pub uptime: u32,
23923    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
23924    pub ram_usage: u32,
23925    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
23926    pub ram_total: u32,
23927    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
23928    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23929    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23930    pub storage_type: [u32; 4],
23931    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
23932    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23933    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23934    pub storage_usage: [u32; 4],
23935    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
23936    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23937    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23938    pub storage_total: [u32; 4],
23939    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
23940    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23941    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23942    pub link_type: [u32; 6],
23943    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
23944    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23945    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23946    pub link_tx_rate: [u32; 6],
23947    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
23948    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23949    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23950    pub link_rx_rate: [u32; 6],
23951    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
23952    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23953    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23954    pub link_tx_max: [u32; 6],
23955    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
23956    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23957    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23958    pub link_rx_max: [u32; 6],
23959    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
23960    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23961    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23962    pub fan_speed: [i16; 4],
23963    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
23964    pub mavtype: u8,
23965    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
23966    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23967    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23968    pub cpu_cores: [u8; 8],
23969    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
23970    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23971    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23972    pub cpu_combined: [u8; 10],
23973    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
23974    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23975    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23976    pub gpu_cores: [u8; 4],
23977    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
23978    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23979    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23980    pub gpu_combined: [u8; 10],
23981    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
23982    pub temperature_board: i8,
23983    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
23984    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23985    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23986    pub temperature_core: [i8; 8],
23987}
23988impl ONBOARD_COMPUTER_STATUS_DATA {
23989    pub const ENCODED_LEN: usize = 238usize;
23990    pub const DEFAULT: Self = Self {
23991        time_usec: 0_u64,
23992        uptime: 0_u32,
23993        ram_usage: 0_u32,
23994        ram_total: 0_u32,
23995        storage_type: [0_u32; 4usize],
23996        storage_usage: [0_u32; 4usize],
23997        storage_total: [0_u32; 4usize],
23998        link_type: [0_u32; 6usize],
23999        link_tx_rate: [0_u32; 6usize],
24000        link_rx_rate: [0_u32; 6usize],
24001        link_tx_max: [0_u32; 6usize],
24002        link_rx_max: [0_u32; 6usize],
24003        fan_speed: [0_i16; 4usize],
24004        mavtype: 0_u8,
24005        cpu_cores: [0_u8; 8usize],
24006        cpu_combined: [0_u8; 10usize],
24007        gpu_cores: [0_u8; 4usize],
24008        gpu_combined: [0_u8; 10usize],
24009        temperature_board: 0_i8,
24010        temperature_core: [0_i8; 8usize],
24011    };
24012    #[cfg(feature = "arbitrary")]
24013    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24014        use arbitrary::{Arbitrary, Unstructured};
24015        let mut buf = [0u8; 1024];
24016        rng.fill_bytes(&mut buf);
24017        let mut unstructured = Unstructured::new(&buf);
24018        Self::arbitrary(&mut unstructured).unwrap_or_default()
24019    }
24020}
24021impl Default for ONBOARD_COMPUTER_STATUS_DATA {
24022    fn default() -> Self {
24023        Self::DEFAULT.clone()
24024    }
24025}
24026impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
24027    type Message = MavMessage;
24028    const ID: u32 = 390u32;
24029    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
24030    const EXTRA_CRC: u8 = 156u8;
24031    const ENCODED_LEN: usize = 238usize;
24032    fn deser(
24033        _version: MavlinkVersion,
24034        __input: &[u8],
24035    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24036        let avail_len = __input.len();
24037        let mut payload_buf = [0; Self::ENCODED_LEN];
24038        let mut buf = if avail_len < Self::ENCODED_LEN {
24039            payload_buf[0..avail_len].copy_from_slice(__input);
24040            Bytes::new(&payload_buf)
24041        } else {
24042            Bytes::new(__input)
24043        };
24044        let mut __struct = Self::default();
24045        __struct.time_usec = buf.get_u64_le()?;
24046        __struct.uptime = buf.get_u32_le()?;
24047        __struct.ram_usage = buf.get_u32_le()?;
24048        __struct.ram_total = buf.get_u32_le()?;
24049        for v in &mut __struct.storage_type {
24050            let val = buf.get_u32_le()?;
24051            *v = val;
24052        }
24053        for v in &mut __struct.storage_usage {
24054            let val = buf.get_u32_le()?;
24055            *v = val;
24056        }
24057        for v in &mut __struct.storage_total {
24058            let val = buf.get_u32_le()?;
24059            *v = val;
24060        }
24061        for v in &mut __struct.link_type {
24062            let val = buf.get_u32_le()?;
24063            *v = val;
24064        }
24065        for v in &mut __struct.link_tx_rate {
24066            let val = buf.get_u32_le()?;
24067            *v = val;
24068        }
24069        for v in &mut __struct.link_rx_rate {
24070            let val = buf.get_u32_le()?;
24071            *v = val;
24072        }
24073        for v in &mut __struct.link_tx_max {
24074            let val = buf.get_u32_le()?;
24075            *v = val;
24076        }
24077        for v in &mut __struct.link_rx_max {
24078            let val = buf.get_u32_le()?;
24079            *v = val;
24080        }
24081        for v in &mut __struct.fan_speed {
24082            let val = buf.get_i16_le()?;
24083            *v = val;
24084        }
24085        __struct.mavtype = buf.get_u8()?;
24086        for v in &mut __struct.cpu_cores {
24087            let val = buf.get_u8()?;
24088            *v = val;
24089        }
24090        for v in &mut __struct.cpu_combined {
24091            let val = buf.get_u8()?;
24092            *v = val;
24093        }
24094        for v in &mut __struct.gpu_cores {
24095            let val = buf.get_u8()?;
24096            *v = val;
24097        }
24098        for v in &mut __struct.gpu_combined {
24099            let val = buf.get_u8()?;
24100            *v = val;
24101        }
24102        __struct.temperature_board = buf.get_i8()?;
24103        for v in &mut __struct.temperature_core {
24104            let val = buf.get_i8()?;
24105            *v = val;
24106        }
24107        Ok(__struct)
24108    }
24109    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24110        let mut __tmp = BytesMut::new(bytes);
24111        #[allow(clippy::absurd_extreme_comparisons)]
24112        #[allow(unused_comparisons)]
24113        if __tmp.remaining() < Self::ENCODED_LEN {
24114            panic!(
24115                "buffer is too small (need {} bytes, but got {})",
24116                Self::ENCODED_LEN,
24117                __tmp.remaining(),
24118            )
24119        }
24120        __tmp.put_u64_le(self.time_usec);
24121        __tmp.put_u32_le(self.uptime);
24122        __tmp.put_u32_le(self.ram_usage);
24123        __tmp.put_u32_le(self.ram_total);
24124        for val in &self.storage_type {
24125            __tmp.put_u32_le(*val);
24126        }
24127        for val in &self.storage_usage {
24128            __tmp.put_u32_le(*val);
24129        }
24130        for val in &self.storage_total {
24131            __tmp.put_u32_le(*val);
24132        }
24133        for val in &self.link_type {
24134            __tmp.put_u32_le(*val);
24135        }
24136        for val in &self.link_tx_rate {
24137            __tmp.put_u32_le(*val);
24138        }
24139        for val in &self.link_rx_rate {
24140            __tmp.put_u32_le(*val);
24141        }
24142        for val in &self.link_tx_max {
24143            __tmp.put_u32_le(*val);
24144        }
24145        for val in &self.link_rx_max {
24146            __tmp.put_u32_le(*val);
24147        }
24148        for val in &self.fan_speed {
24149            __tmp.put_i16_le(*val);
24150        }
24151        __tmp.put_u8(self.mavtype);
24152        for val in &self.cpu_cores {
24153            __tmp.put_u8(*val);
24154        }
24155        for val in &self.cpu_combined {
24156            __tmp.put_u8(*val);
24157        }
24158        for val in &self.gpu_cores {
24159            __tmp.put_u8(*val);
24160        }
24161        for val in &self.gpu_combined {
24162            __tmp.put_u8(*val);
24163        }
24164        __tmp.put_i8(self.temperature_board);
24165        for val in &self.temperature_core {
24166            __tmp.put_i8(*val);
24167        }
24168        if matches!(version, MavlinkVersion::V2) {
24169            let len = __tmp.len();
24170            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24171        } else {
24172            __tmp.len()
24173        }
24174    }
24175}
24176#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
24177#[doc = ""]
24178#[doc = "ID: 12918"]
24179#[derive(Debug, Clone, PartialEq)]
24180#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24181#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24182#[cfg_attr(feature = "ts", derive(TS))]
24183#[cfg_attr(feature = "ts", ts(export))]
24184pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
24185    #[doc = "Status level indicating if arming is allowed."]
24186    pub status: MavOdidArmStatus,
24187    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
24188    #[cfg_attr(feature = "ts", ts(type = "string"))]
24189    pub error: CharArray<50>,
24190}
24191impl OPEN_DRONE_ID_ARM_STATUS_DATA {
24192    pub const ENCODED_LEN: usize = 51usize;
24193    pub const DEFAULT: Self = Self {
24194        status: MavOdidArmStatus::DEFAULT,
24195        error: CharArray::new([0_u8; 50usize]),
24196    };
24197    #[cfg(feature = "arbitrary")]
24198    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24199        use arbitrary::{Arbitrary, Unstructured};
24200        let mut buf = [0u8; 1024];
24201        rng.fill_bytes(&mut buf);
24202        let mut unstructured = Unstructured::new(&buf);
24203        Self::arbitrary(&mut unstructured).unwrap_or_default()
24204    }
24205}
24206impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
24207    fn default() -> Self {
24208        Self::DEFAULT.clone()
24209    }
24210}
24211impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
24212    type Message = MavMessage;
24213    const ID: u32 = 12918u32;
24214    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
24215    const EXTRA_CRC: u8 = 139u8;
24216    const ENCODED_LEN: usize = 51usize;
24217    fn deser(
24218        _version: MavlinkVersion,
24219        __input: &[u8],
24220    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24221        let avail_len = __input.len();
24222        let mut payload_buf = [0; Self::ENCODED_LEN];
24223        let mut buf = if avail_len < Self::ENCODED_LEN {
24224            payload_buf[0..avail_len].copy_from_slice(__input);
24225            Bytes::new(&payload_buf)
24226        } else {
24227            Bytes::new(__input)
24228        };
24229        let mut __struct = Self::default();
24230        let tmp = buf.get_u8()?;
24231        __struct.status =
24232            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24233                enum_type: "MavOdidArmStatus",
24234                value: tmp as u64,
24235            })?;
24236        let mut tmp = [0_u8; 50usize];
24237        for v in &mut tmp {
24238            *v = buf.get_u8()?;
24239        }
24240        __struct.error = CharArray::new(tmp);
24241        Ok(__struct)
24242    }
24243    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24244        let mut __tmp = BytesMut::new(bytes);
24245        #[allow(clippy::absurd_extreme_comparisons)]
24246        #[allow(unused_comparisons)]
24247        if __tmp.remaining() < Self::ENCODED_LEN {
24248            panic!(
24249                "buffer is too small (need {} bytes, but got {})",
24250                Self::ENCODED_LEN,
24251                __tmp.remaining(),
24252            )
24253        }
24254        __tmp.put_u8(self.status as u8);
24255        for val in &self.error {
24256            __tmp.put_u8(*val);
24257        }
24258        if matches!(version, MavlinkVersion::V2) {
24259            let len = __tmp.len();
24260            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24261        } else {
24262            __tmp.len()
24263        }
24264    }
24265}
24266#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
24267#[doc = ""]
24268#[doc = "ID: 12902"]
24269#[derive(Debug, Clone, PartialEq)]
24270#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24271#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24272#[cfg_attr(feature = "ts", derive(TS))]
24273#[cfg_attr(feature = "ts", ts(export))]
24274pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
24275    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
24276    pub timestamp: u32,
24277    #[doc = "System ID (0 for broadcast)."]
24278    pub target_system: u8,
24279    #[doc = "Component ID (0 for broadcast)."]
24280    pub target_component: u8,
24281    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
24282    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24283    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24284    pub id_or_mac: [u8; 20],
24285    #[doc = "Indicates the type of authentication."]
24286    pub authentication_type: MavOdidAuthType,
24287    #[doc = "Allowed range is 0 - 15."]
24288    pub data_page: u8,
24289    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
24290    pub last_page_index: u8,
24291    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
24292    pub length: u8,
24293    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
24294    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24295    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24296    pub authentication_data: [u8; 23],
24297}
24298impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
24299    pub const ENCODED_LEN: usize = 53usize;
24300    pub const DEFAULT: Self = Self {
24301        timestamp: 0_u32,
24302        target_system: 0_u8,
24303        target_component: 0_u8,
24304        id_or_mac: [0_u8; 20usize],
24305        authentication_type: MavOdidAuthType::DEFAULT,
24306        data_page: 0_u8,
24307        last_page_index: 0_u8,
24308        length: 0_u8,
24309        authentication_data: [0_u8; 23usize],
24310    };
24311    #[cfg(feature = "arbitrary")]
24312    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24313        use arbitrary::{Arbitrary, Unstructured};
24314        let mut buf = [0u8; 1024];
24315        rng.fill_bytes(&mut buf);
24316        let mut unstructured = Unstructured::new(&buf);
24317        Self::arbitrary(&mut unstructured).unwrap_or_default()
24318    }
24319}
24320impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
24321    fn default() -> Self {
24322        Self::DEFAULT.clone()
24323    }
24324}
24325impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
24326    type Message = MavMessage;
24327    const ID: u32 = 12902u32;
24328    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
24329    const EXTRA_CRC: u8 = 140u8;
24330    const ENCODED_LEN: usize = 53usize;
24331    fn deser(
24332        _version: MavlinkVersion,
24333        __input: &[u8],
24334    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24335        let avail_len = __input.len();
24336        let mut payload_buf = [0; Self::ENCODED_LEN];
24337        let mut buf = if avail_len < Self::ENCODED_LEN {
24338            payload_buf[0..avail_len].copy_from_slice(__input);
24339            Bytes::new(&payload_buf)
24340        } else {
24341            Bytes::new(__input)
24342        };
24343        let mut __struct = Self::default();
24344        __struct.timestamp = buf.get_u32_le()?;
24345        __struct.target_system = buf.get_u8()?;
24346        __struct.target_component = buf.get_u8()?;
24347        for v in &mut __struct.id_or_mac {
24348            let val = buf.get_u8()?;
24349            *v = val;
24350        }
24351        let tmp = buf.get_u8()?;
24352        __struct.authentication_type =
24353            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24354                enum_type: "MavOdidAuthType",
24355                value: tmp as u64,
24356            })?;
24357        __struct.data_page = buf.get_u8()?;
24358        __struct.last_page_index = buf.get_u8()?;
24359        __struct.length = buf.get_u8()?;
24360        for v in &mut __struct.authentication_data {
24361            let val = buf.get_u8()?;
24362            *v = val;
24363        }
24364        Ok(__struct)
24365    }
24366    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24367        let mut __tmp = BytesMut::new(bytes);
24368        #[allow(clippy::absurd_extreme_comparisons)]
24369        #[allow(unused_comparisons)]
24370        if __tmp.remaining() < Self::ENCODED_LEN {
24371            panic!(
24372                "buffer is too small (need {} bytes, but got {})",
24373                Self::ENCODED_LEN,
24374                __tmp.remaining(),
24375            )
24376        }
24377        __tmp.put_u32_le(self.timestamp);
24378        __tmp.put_u8(self.target_system);
24379        __tmp.put_u8(self.target_component);
24380        for val in &self.id_or_mac {
24381            __tmp.put_u8(*val);
24382        }
24383        __tmp.put_u8(self.authentication_type as u8);
24384        __tmp.put_u8(self.data_page);
24385        __tmp.put_u8(self.last_page_index);
24386        __tmp.put_u8(self.length);
24387        for val in &self.authentication_data {
24388            __tmp.put_u8(*val);
24389        }
24390        if matches!(version, MavlinkVersion::V2) {
24391            let len = __tmp.len();
24392            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24393        } else {
24394            __tmp.len()
24395        }
24396    }
24397}
24398#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
24399#[doc = ""]
24400#[doc = "ID: 12900"]
24401#[derive(Debug, Clone, PartialEq)]
24402#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24403#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24404#[cfg_attr(feature = "ts", derive(TS))]
24405#[cfg_attr(feature = "ts", ts(export))]
24406pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
24407    #[doc = "System ID (0 for broadcast)."]
24408    pub target_system: u8,
24409    #[doc = "Component ID (0 for broadcast)."]
24410    pub target_component: u8,
24411    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
24412    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24413    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24414    pub id_or_mac: [u8; 20],
24415    #[doc = "Indicates the format for the uas_id field of this message."]
24416    pub id_type: MavOdidIdType,
24417    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
24418    pub ua_type: MavOdidUaType,
24419    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
24420    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24421    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24422    pub uas_id: [u8; 20],
24423}
24424impl OPEN_DRONE_ID_BASIC_ID_DATA {
24425    pub const ENCODED_LEN: usize = 44usize;
24426    pub const DEFAULT: Self = Self {
24427        target_system: 0_u8,
24428        target_component: 0_u8,
24429        id_or_mac: [0_u8; 20usize],
24430        id_type: MavOdidIdType::DEFAULT,
24431        ua_type: MavOdidUaType::DEFAULT,
24432        uas_id: [0_u8; 20usize],
24433    };
24434    #[cfg(feature = "arbitrary")]
24435    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24436        use arbitrary::{Arbitrary, Unstructured};
24437        let mut buf = [0u8; 1024];
24438        rng.fill_bytes(&mut buf);
24439        let mut unstructured = Unstructured::new(&buf);
24440        Self::arbitrary(&mut unstructured).unwrap_or_default()
24441    }
24442}
24443impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
24444    fn default() -> Self {
24445        Self::DEFAULT.clone()
24446    }
24447}
24448impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
24449    type Message = MavMessage;
24450    const ID: u32 = 12900u32;
24451    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
24452    const EXTRA_CRC: u8 = 114u8;
24453    const ENCODED_LEN: usize = 44usize;
24454    fn deser(
24455        _version: MavlinkVersion,
24456        __input: &[u8],
24457    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24458        let avail_len = __input.len();
24459        let mut payload_buf = [0; Self::ENCODED_LEN];
24460        let mut buf = if avail_len < Self::ENCODED_LEN {
24461            payload_buf[0..avail_len].copy_from_slice(__input);
24462            Bytes::new(&payload_buf)
24463        } else {
24464            Bytes::new(__input)
24465        };
24466        let mut __struct = Self::default();
24467        __struct.target_system = buf.get_u8()?;
24468        __struct.target_component = buf.get_u8()?;
24469        for v in &mut __struct.id_or_mac {
24470            let val = buf.get_u8()?;
24471            *v = val;
24472        }
24473        let tmp = buf.get_u8()?;
24474        __struct.id_type =
24475            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24476                enum_type: "MavOdidIdType",
24477                value: tmp as u64,
24478            })?;
24479        let tmp = buf.get_u8()?;
24480        __struct.ua_type =
24481            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24482                enum_type: "MavOdidUaType",
24483                value: tmp as u64,
24484            })?;
24485        for v in &mut __struct.uas_id {
24486            let val = buf.get_u8()?;
24487            *v = val;
24488        }
24489        Ok(__struct)
24490    }
24491    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24492        let mut __tmp = BytesMut::new(bytes);
24493        #[allow(clippy::absurd_extreme_comparisons)]
24494        #[allow(unused_comparisons)]
24495        if __tmp.remaining() < Self::ENCODED_LEN {
24496            panic!(
24497                "buffer is too small (need {} bytes, but got {})",
24498                Self::ENCODED_LEN,
24499                __tmp.remaining(),
24500            )
24501        }
24502        __tmp.put_u8(self.target_system);
24503        __tmp.put_u8(self.target_component);
24504        for val in &self.id_or_mac {
24505            __tmp.put_u8(*val);
24506        }
24507        __tmp.put_u8(self.id_type as u8);
24508        __tmp.put_u8(self.ua_type as u8);
24509        for val in &self.uas_id {
24510            __tmp.put_u8(*val);
24511        }
24512        if matches!(version, MavlinkVersion::V2) {
24513            let len = __tmp.len();
24514            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24515        } else {
24516            __tmp.len()
24517        }
24518    }
24519}
24520#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
24521#[doc = ""]
24522#[doc = "ID: 12901"]
24523#[derive(Debug, Clone, PartialEq)]
24524#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24525#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24526#[cfg_attr(feature = "ts", derive(TS))]
24527#[cfg_attr(feature = "ts", ts(export))]
24528pub struct OPEN_DRONE_ID_LOCATION_DATA {
24529    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
24530    pub latitude: i32,
24531    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
24532    pub longitude: i32,
24533    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
24534    pub altitude_barometric: f32,
24535    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
24536    pub altitude_geodetic: f32,
24537    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
24538    pub height: f32,
24539    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
24540    pub timestamp: f32,
24541    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
24542    pub direction: u16,
24543    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
24544    pub speed_horizontal: u16,
24545    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
24546    pub speed_vertical: i16,
24547    #[doc = "System ID (0 for broadcast)."]
24548    pub target_system: u8,
24549    #[doc = "Component ID (0 for broadcast)."]
24550    pub target_component: u8,
24551    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
24552    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24553    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24554    pub id_or_mac: [u8; 20],
24555    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
24556    pub status: MavOdidStatus,
24557    #[doc = "Indicates the reference point for the height field."]
24558    pub height_reference: MavOdidHeightRef,
24559    #[doc = "The accuracy of the horizontal position."]
24560    pub horizontal_accuracy: MavOdidHorAcc,
24561    #[doc = "The accuracy of the vertical position."]
24562    pub vertical_accuracy: MavOdidVerAcc,
24563    #[doc = "The accuracy of the barometric altitude."]
24564    pub barometer_accuracy: MavOdidVerAcc,
24565    #[doc = "The accuracy of the horizontal and vertical speed."]
24566    pub speed_accuracy: MavOdidSpeedAcc,
24567    #[doc = "The accuracy of the timestamps."]
24568    pub timestamp_accuracy: MavOdidTimeAcc,
24569}
24570impl OPEN_DRONE_ID_LOCATION_DATA {
24571    pub const ENCODED_LEN: usize = 59usize;
24572    pub const DEFAULT: Self = Self {
24573        latitude: 0_i32,
24574        longitude: 0_i32,
24575        altitude_barometric: 0.0_f32,
24576        altitude_geodetic: 0.0_f32,
24577        height: 0.0_f32,
24578        timestamp: 0.0_f32,
24579        direction: 0_u16,
24580        speed_horizontal: 0_u16,
24581        speed_vertical: 0_i16,
24582        target_system: 0_u8,
24583        target_component: 0_u8,
24584        id_or_mac: [0_u8; 20usize],
24585        status: MavOdidStatus::DEFAULT,
24586        height_reference: MavOdidHeightRef::DEFAULT,
24587        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
24588        vertical_accuracy: MavOdidVerAcc::DEFAULT,
24589        barometer_accuracy: MavOdidVerAcc::DEFAULT,
24590        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
24591        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
24592    };
24593    #[cfg(feature = "arbitrary")]
24594    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24595        use arbitrary::{Arbitrary, Unstructured};
24596        let mut buf = [0u8; 1024];
24597        rng.fill_bytes(&mut buf);
24598        let mut unstructured = Unstructured::new(&buf);
24599        Self::arbitrary(&mut unstructured).unwrap_or_default()
24600    }
24601}
24602impl Default for OPEN_DRONE_ID_LOCATION_DATA {
24603    fn default() -> Self {
24604        Self::DEFAULT.clone()
24605    }
24606}
24607impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
24608    type Message = MavMessage;
24609    const ID: u32 = 12901u32;
24610    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
24611    const EXTRA_CRC: u8 = 254u8;
24612    const ENCODED_LEN: usize = 59usize;
24613    fn deser(
24614        _version: MavlinkVersion,
24615        __input: &[u8],
24616    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24617        let avail_len = __input.len();
24618        let mut payload_buf = [0; Self::ENCODED_LEN];
24619        let mut buf = if avail_len < Self::ENCODED_LEN {
24620            payload_buf[0..avail_len].copy_from_slice(__input);
24621            Bytes::new(&payload_buf)
24622        } else {
24623            Bytes::new(__input)
24624        };
24625        let mut __struct = Self::default();
24626        __struct.latitude = buf.get_i32_le()?;
24627        __struct.longitude = buf.get_i32_le()?;
24628        __struct.altitude_barometric = buf.get_f32_le()?;
24629        __struct.altitude_geodetic = buf.get_f32_le()?;
24630        __struct.height = buf.get_f32_le()?;
24631        __struct.timestamp = buf.get_f32_le()?;
24632        __struct.direction = buf.get_u16_le()?;
24633        __struct.speed_horizontal = buf.get_u16_le()?;
24634        __struct.speed_vertical = buf.get_i16_le()?;
24635        __struct.target_system = buf.get_u8()?;
24636        __struct.target_component = buf.get_u8()?;
24637        for v in &mut __struct.id_or_mac {
24638            let val = buf.get_u8()?;
24639            *v = val;
24640        }
24641        let tmp = buf.get_u8()?;
24642        __struct.status =
24643            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24644                enum_type: "MavOdidStatus",
24645                value: tmp as u64,
24646            })?;
24647        let tmp = buf.get_u8()?;
24648        __struct.height_reference =
24649            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24650                enum_type: "MavOdidHeightRef",
24651                value: tmp as u64,
24652            })?;
24653        let tmp = buf.get_u8()?;
24654        __struct.horizontal_accuracy =
24655            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24656                enum_type: "MavOdidHorAcc",
24657                value: tmp as u64,
24658            })?;
24659        let tmp = buf.get_u8()?;
24660        __struct.vertical_accuracy =
24661            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24662                enum_type: "MavOdidVerAcc",
24663                value: tmp as u64,
24664            })?;
24665        let tmp = buf.get_u8()?;
24666        __struct.barometer_accuracy =
24667            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24668                enum_type: "MavOdidVerAcc",
24669                value: tmp as u64,
24670            })?;
24671        let tmp = buf.get_u8()?;
24672        __struct.speed_accuracy =
24673            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24674                enum_type: "MavOdidSpeedAcc",
24675                value: tmp as u64,
24676            })?;
24677        let tmp = buf.get_u8()?;
24678        __struct.timestamp_accuracy =
24679            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24680                enum_type: "MavOdidTimeAcc",
24681                value: tmp as u64,
24682            })?;
24683        Ok(__struct)
24684    }
24685    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24686        let mut __tmp = BytesMut::new(bytes);
24687        #[allow(clippy::absurd_extreme_comparisons)]
24688        #[allow(unused_comparisons)]
24689        if __tmp.remaining() < Self::ENCODED_LEN {
24690            panic!(
24691                "buffer is too small (need {} bytes, but got {})",
24692                Self::ENCODED_LEN,
24693                __tmp.remaining(),
24694            )
24695        }
24696        __tmp.put_i32_le(self.latitude);
24697        __tmp.put_i32_le(self.longitude);
24698        __tmp.put_f32_le(self.altitude_barometric);
24699        __tmp.put_f32_le(self.altitude_geodetic);
24700        __tmp.put_f32_le(self.height);
24701        __tmp.put_f32_le(self.timestamp);
24702        __tmp.put_u16_le(self.direction);
24703        __tmp.put_u16_le(self.speed_horizontal);
24704        __tmp.put_i16_le(self.speed_vertical);
24705        __tmp.put_u8(self.target_system);
24706        __tmp.put_u8(self.target_component);
24707        for val in &self.id_or_mac {
24708            __tmp.put_u8(*val);
24709        }
24710        __tmp.put_u8(self.status as u8);
24711        __tmp.put_u8(self.height_reference as u8);
24712        __tmp.put_u8(self.horizontal_accuracy as u8);
24713        __tmp.put_u8(self.vertical_accuracy as u8);
24714        __tmp.put_u8(self.barometer_accuracy as u8);
24715        __tmp.put_u8(self.speed_accuracy as u8);
24716        __tmp.put_u8(self.timestamp_accuracy as u8);
24717        if matches!(version, MavlinkVersion::V2) {
24718            let len = __tmp.len();
24719            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24720        } else {
24721            __tmp.len()
24722        }
24723    }
24724}
24725#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
24726#[doc = ""]
24727#[doc = "ID: 12915"]
24728#[derive(Debug, Clone, PartialEq)]
24729#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24730#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24731#[cfg_attr(feature = "ts", derive(TS))]
24732#[cfg_attr(feature = "ts", ts(export))]
24733pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
24734    #[doc = "System ID (0 for broadcast)."]
24735    pub target_system: u8,
24736    #[doc = "Component ID (0 for broadcast)."]
24737    pub target_component: u8,
24738    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
24739    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24740    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24741    pub id_or_mac: [u8; 20],
24742    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
24743    pub single_message_size: u8,
24744    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
24745    pub msg_pack_size: u8,
24746    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
24747    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24748    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24749    pub messages: [u8; 225],
24750}
24751impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
24752    pub const ENCODED_LEN: usize = 249usize;
24753    pub const DEFAULT: Self = Self {
24754        target_system: 0_u8,
24755        target_component: 0_u8,
24756        id_or_mac: [0_u8; 20usize],
24757        single_message_size: 0_u8,
24758        msg_pack_size: 0_u8,
24759        messages: [0_u8; 225usize],
24760    };
24761    #[cfg(feature = "arbitrary")]
24762    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24763        use arbitrary::{Arbitrary, Unstructured};
24764        let mut buf = [0u8; 1024];
24765        rng.fill_bytes(&mut buf);
24766        let mut unstructured = Unstructured::new(&buf);
24767        Self::arbitrary(&mut unstructured).unwrap_or_default()
24768    }
24769}
24770impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
24771    fn default() -> Self {
24772        Self::DEFAULT.clone()
24773    }
24774}
24775impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
24776    type Message = MavMessage;
24777    const ID: u32 = 12915u32;
24778    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
24779    const EXTRA_CRC: u8 = 94u8;
24780    const ENCODED_LEN: usize = 249usize;
24781    fn deser(
24782        _version: MavlinkVersion,
24783        __input: &[u8],
24784    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24785        let avail_len = __input.len();
24786        let mut payload_buf = [0; Self::ENCODED_LEN];
24787        let mut buf = if avail_len < Self::ENCODED_LEN {
24788            payload_buf[0..avail_len].copy_from_slice(__input);
24789            Bytes::new(&payload_buf)
24790        } else {
24791            Bytes::new(__input)
24792        };
24793        let mut __struct = Self::default();
24794        __struct.target_system = buf.get_u8()?;
24795        __struct.target_component = buf.get_u8()?;
24796        for v in &mut __struct.id_or_mac {
24797            let val = buf.get_u8()?;
24798            *v = val;
24799        }
24800        __struct.single_message_size = buf.get_u8()?;
24801        __struct.msg_pack_size = buf.get_u8()?;
24802        for v in &mut __struct.messages {
24803            let val = buf.get_u8()?;
24804            *v = val;
24805        }
24806        Ok(__struct)
24807    }
24808    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24809        let mut __tmp = BytesMut::new(bytes);
24810        #[allow(clippy::absurd_extreme_comparisons)]
24811        #[allow(unused_comparisons)]
24812        if __tmp.remaining() < Self::ENCODED_LEN {
24813            panic!(
24814                "buffer is too small (need {} bytes, but got {})",
24815                Self::ENCODED_LEN,
24816                __tmp.remaining(),
24817            )
24818        }
24819        __tmp.put_u8(self.target_system);
24820        __tmp.put_u8(self.target_component);
24821        for val in &self.id_or_mac {
24822            __tmp.put_u8(*val);
24823        }
24824        __tmp.put_u8(self.single_message_size);
24825        __tmp.put_u8(self.msg_pack_size);
24826        for val in &self.messages {
24827            __tmp.put_u8(*val);
24828        }
24829        if matches!(version, MavlinkVersion::V2) {
24830            let len = __tmp.len();
24831            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24832        } else {
24833            __tmp.len()
24834        }
24835    }
24836}
24837#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
24838#[doc = ""]
24839#[doc = "ID: 12905"]
24840#[derive(Debug, Clone, PartialEq)]
24841#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24842#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24843#[cfg_attr(feature = "ts", derive(TS))]
24844#[cfg_attr(feature = "ts", ts(export))]
24845pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
24846    #[doc = "System ID (0 for broadcast)."]
24847    pub target_system: u8,
24848    #[doc = "Component ID (0 for broadcast)."]
24849    pub target_component: u8,
24850    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
24851    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24852    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24853    pub id_or_mac: [u8; 20],
24854    #[doc = "Indicates the type of the operator_id field."]
24855    pub operator_id_type: MavOdidOperatorIdType,
24856    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
24857    #[cfg_attr(feature = "ts", ts(type = "string"))]
24858    pub operator_id: CharArray<20>,
24859}
24860impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
24861    pub const ENCODED_LEN: usize = 43usize;
24862    pub const DEFAULT: Self = Self {
24863        target_system: 0_u8,
24864        target_component: 0_u8,
24865        id_or_mac: [0_u8; 20usize],
24866        operator_id_type: MavOdidOperatorIdType::DEFAULT,
24867        operator_id: CharArray::new([0_u8; 20usize]),
24868    };
24869    #[cfg(feature = "arbitrary")]
24870    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24871        use arbitrary::{Arbitrary, Unstructured};
24872        let mut buf = [0u8; 1024];
24873        rng.fill_bytes(&mut buf);
24874        let mut unstructured = Unstructured::new(&buf);
24875        Self::arbitrary(&mut unstructured).unwrap_or_default()
24876    }
24877}
24878impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
24879    fn default() -> Self {
24880        Self::DEFAULT.clone()
24881    }
24882}
24883impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
24884    type Message = MavMessage;
24885    const ID: u32 = 12905u32;
24886    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
24887    const EXTRA_CRC: u8 = 49u8;
24888    const ENCODED_LEN: usize = 43usize;
24889    fn deser(
24890        _version: MavlinkVersion,
24891        __input: &[u8],
24892    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24893        let avail_len = __input.len();
24894        let mut payload_buf = [0; Self::ENCODED_LEN];
24895        let mut buf = if avail_len < Self::ENCODED_LEN {
24896            payload_buf[0..avail_len].copy_from_slice(__input);
24897            Bytes::new(&payload_buf)
24898        } else {
24899            Bytes::new(__input)
24900        };
24901        let mut __struct = Self::default();
24902        __struct.target_system = buf.get_u8()?;
24903        __struct.target_component = buf.get_u8()?;
24904        for v in &mut __struct.id_or_mac {
24905            let val = buf.get_u8()?;
24906            *v = val;
24907        }
24908        let tmp = buf.get_u8()?;
24909        __struct.operator_id_type =
24910            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24911                enum_type: "MavOdidOperatorIdType",
24912                value: tmp as u64,
24913            })?;
24914        let mut tmp = [0_u8; 20usize];
24915        for v in &mut tmp {
24916            *v = buf.get_u8()?;
24917        }
24918        __struct.operator_id = CharArray::new(tmp);
24919        Ok(__struct)
24920    }
24921    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24922        let mut __tmp = BytesMut::new(bytes);
24923        #[allow(clippy::absurd_extreme_comparisons)]
24924        #[allow(unused_comparisons)]
24925        if __tmp.remaining() < Self::ENCODED_LEN {
24926            panic!(
24927                "buffer is too small (need {} bytes, but got {})",
24928                Self::ENCODED_LEN,
24929                __tmp.remaining(),
24930            )
24931        }
24932        __tmp.put_u8(self.target_system);
24933        __tmp.put_u8(self.target_component);
24934        for val in &self.id_or_mac {
24935            __tmp.put_u8(*val);
24936        }
24937        __tmp.put_u8(self.operator_id_type as u8);
24938        for val in &self.operator_id {
24939            __tmp.put_u8(*val);
24940        }
24941        if matches!(version, MavlinkVersion::V2) {
24942            let len = __tmp.len();
24943            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24944        } else {
24945            __tmp.len()
24946        }
24947    }
24948}
24949#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
24950#[doc = ""]
24951#[doc = "ID: 12903"]
24952#[derive(Debug, Clone, PartialEq)]
24953#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24954#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24955#[cfg_attr(feature = "ts", derive(TS))]
24956#[cfg_attr(feature = "ts", ts(export))]
24957pub struct OPEN_DRONE_ID_SELF_ID_DATA {
24958    #[doc = "System ID (0 for broadcast)."]
24959    pub target_system: u8,
24960    #[doc = "Component ID (0 for broadcast)."]
24961    pub target_component: u8,
24962    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
24963    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24964    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24965    pub id_or_mac: [u8; 20],
24966    #[doc = "Indicates the type of the description field."]
24967    pub description_type: MavOdidDescType,
24968    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
24969    #[cfg_attr(feature = "ts", ts(type = "string"))]
24970    pub description: CharArray<23>,
24971}
24972impl OPEN_DRONE_ID_SELF_ID_DATA {
24973    pub const ENCODED_LEN: usize = 46usize;
24974    pub const DEFAULT: Self = Self {
24975        target_system: 0_u8,
24976        target_component: 0_u8,
24977        id_or_mac: [0_u8; 20usize],
24978        description_type: MavOdidDescType::DEFAULT,
24979        description: CharArray::new([0_u8; 23usize]),
24980    };
24981    #[cfg(feature = "arbitrary")]
24982    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24983        use arbitrary::{Arbitrary, Unstructured};
24984        let mut buf = [0u8; 1024];
24985        rng.fill_bytes(&mut buf);
24986        let mut unstructured = Unstructured::new(&buf);
24987        Self::arbitrary(&mut unstructured).unwrap_or_default()
24988    }
24989}
24990impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
24991    fn default() -> Self {
24992        Self::DEFAULT.clone()
24993    }
24994}
24995impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
24996    type Message = MavMessage;
24997    const ID: u32 = 12903u32;
24998    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
24999    const EXTRA_CRC: u8 = 249u8;
25000    const ENCODED_LEN: usize = 46usize;
25001    fn deser(
25002        _version: MavlinkVersion,
25003        __input: &[u8],
25004    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25005        let avail_len = __input.len();
25006        let mut payload_buf = [0; Self::ENCODED_LEN];
25007        let mut buf = if avail_len < Self::ENCODED_LEN {
25008            payload_buf[0..avail_len].copy_from_slice(__input);
25009            Bytes::new(&payload_buf)
25010        } else {
25011            Bytes::new(__input)
25012        };
25013        let mut __struct = Self::default();
25014        __struct.target_system = buf.get_u8()?;
25015        __struct.target_component = buf.get_u8()?;
25016        for v in &mut __struct.id_or_mac {
25017            let val = buf.get_u8()?;
25018            *v = val;
25019        }
25020        let tmp = buf.get_u8()?;
25021        __struct.description_type =
25022            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25023                enum_type: "MavOdidDescType",
25024                value: tmp as u64,
25025            })?;
25026        let mut tmp = [0_u8; 23usize];
25027        for v in &mut tmp {
25028            *v = buf.get_u8()?;
25029        }
25030        __struct.description = CharArray::new(tmp);
25031        Ok(__struct)
25032    }
25033    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25034        let mut __tmp = BytesMut::new(bytes);
25035        #[allow(clippy::absurd_extreme_comparisons)]
25036        #[allow(unused_comparisons)]
25037        if __tmp.remaining() < Self::ENCODED_LEN {
25038            panic!(
25039                "buffer is too small (need {} bytes, but got {})",
25040                Self::ENCODED_LEN,
25041                __tmp.remaining(),
25042            )
25043        }
25044        __tmp.put_u8(self.target_system);
25045        __tmp.put_u8(self.target_component);
25046        for val in &self.id_or_mac {
25047            __tmp.put_u8(*val);
25048        }
25049        __tmp.put_u8(self.description_type as u8);
25050        for val in &self.description {
25051            __tmp.put_u8(*val);
25052        }
25053        if matches!(version, MavlinkVersion::V2) {
25054            let len = __tmp.len();
25055            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25056        } else {
25057            __tmp.len()
25058        }
25059    }
25060}
25061#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
25062#[doc = ""]
25063#[doc = "ID: 12904"]
25064#[derive(Debug, Clone, PartialEq)]
25065#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25066#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25067#[cfg_attr(feature = "ts", derive(TS))]
25068#[cfg_attr(feature = "ts", ts(export))]
25069pub struct OPEN_DRONE_ID_SYSTEM_DATA {
25070    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
25071    pub operator_latitude: i32,
25072    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
25073    pub operator_longitude: i32,
25074    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
25075    pub area_ceiling: f32,
25076    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
25077    pub area_floor: f32,
25078    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
25079    pub operator_altitude_geo: f32,
25080    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
25081    pub timestamp: u32,
25082    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
25083    pub area_count: u16,
25084    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
25085    pub area_radius: u16,
25086    #[doc = "System ID (0 for broadcast)."]
25087    pub target_system: u8,
25088    #[doc = "Component ID (0 for broadcast)."]
25089    pub target_component: u8,
25090    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
25091    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25092    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25093    pub id_or_mac: [u8; 20],
25094    #[doc = "Specifies the operator location type."]
25095    pub operator_location_type: MavOdidOperatorLocationType,
25096    #[doc = "Specifies the classification type of the UA."]
25097    pub classification_type: MavOdidClassificationType,
25098    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
25099    pub category_eu: MavOdidCategoryEu,
25100    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
25101    pub class_eu: MavOdidClassEu,
25102}
25103impl OPEN_DRONE_ID_SYSTEM_DATA {
25104    pub const ENCODED_LEN: usize = 54usize;
25105    pub const DEFAULT: Self = Self {
25106        operator_latitude: 0_i32,
25107        operator_longitude: 0_i32,
25108        area_ceiling: 0.0_f32,
25109        area_floor: 0.0_f32,
25110        operator_altitude_geo: 0.0_f32,
25111        timestamp: 0_u32,
25112        area_count: 0_u16,
25113        area_radius: 0_u16,
25114        target_system: 0_u8,
25115        target_component: 0_u8,
25116        id_or_mac: [0_u8; 20usize],
25117        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
25118        classification_type: MavOdidClassificationType::DEFAULT,
25119        category_eu: MavOdidCategoryEu::DEFAULT,
25120        class_eu: MavOdidClassEu::DEFAULT,
25121    };
25122    #[cfg(feature = "arbitrary")]
25123    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25124        use arbitrary::{Arbitrary, Unstructured};
25125        let mut buf = [0u8; 1024];
25126        rng.fill_bytes(&mut buf);
25127        let mut unstructured = Unstructured::new(&buf);
25128        Self::arbitrary(&mut unstructured).unwrap_or_default()
25129    }
25130}
25131impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
25132    fn default() -> Self {
25133        Self::DEFAULT.clone()
25134    }
25135}
25136impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
25137    type Message = MavMessage;
25138    const ID: u32 = 12904u32;
25139    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
25140    const EXTRA_CRC: u8 = 77u8;
25141    const ENCODED_LEN: usize = 54usize;
25142    fn deser(
25143        _version: MavlinkVersion,
25144        __input: &[u8],
25145    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25146        let avail_len = __input.len();
25147        let mut payload_buf = [0; Self::ENCODED_LEN];
25148        let mut buf = if avail_len < Self::ENCODED_LEN {
25149            payload_buf[0..avail_len].copy_from_slice(__input);
25150            Bytes::new(&payload_buf)
25151        } else {
25152            Bytes::new(__input)
25153        };
25154        let mut __struct = Self::default();
25155        __struct.operator_latitude = buf.get_i32_le()?;
25156        __struct.operator_longitude = buf.get_i32_le()?;
25157        __struct.area_ceiling = buf.get_f32_le()?;
25158        __struct.area_floor = buf.get_f32_le()?;
25159        __struct.operator_altitude_geo = buf.get_f32_le()?;
25160        __struct.timestamp = buf.get_u32_le()?;
25161        __struct.area_count = buf.get_u16_le()?;
25162        __struct.area_radius = buf.get_u16_le()?;
25163        __struct.target_system = buf.get_u8()?;
25164        __struct.target_component = buf.get_u8()?;
25165        for v in &mut __struct.id_or_mac {
25166            let val = buf.get_u8()?;
25167            *v = val;
25168        }
25169        let tmp = buf.get_u8()?;
25170        __struct.operator_location_type =
25171            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25172                enum_type: "MavOdidOperatorLocationType",
25173                value: tmp as u64,
25174            })?;
25175        let tmp = buf.get_u8()?;
25176        __struct.classification_type =
25177            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25178                enum_type: "MavOdidClassificationType",
25179                value: tmp as u64,
25180            })?;
25181        let tmp = buf.get_u8()?;
25182        __struct.category_eu =
25183            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25184                enum_type: "MavOdidCategoryEu",
25185                value: tmp as u64,
25186            })?;
25187        let tmp = buf.get_u8()?;
25188        __struct.class_eu =
25189            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25190                enum_type: "MavOdidClassEu",
25191                value: tmp as u64,
25192            })?;
25193        Ok(__struct)
25194    }
25195    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25196        let mut __tmp = BytesMut::new(bytes);
25197        #[allow(clippy::absurd_extreme_comparisons)]
25198        #[allow(unused_comparisons)]
25199        if __tmp.remaining() < Self::ENCODED_LEN {
25200            panic!(
25201                "buffer is too small (need {} bytes, but got {})",
25202                Self::ENCODED_LEN,
25203                __tmp.remaining(),
25204            )
25205        }
25206        __tmp.put_i32_le(self.operator_latitude);
25207        __tmp.put_i32_le(self.operator_longitude);
25208        __tmp.put_f32_le(self.area_ceiling);
25209        __tmp.put_f32_le(self.area_floor);
25210        __tmp.put_f32_le(self.operator_altitude_geo);
25211        __tmp.put_u32_le(self.timestamp);
25212        __tmp.put_u16_le(self.area_count);
25213        __tmp.put_u16_le(self.area_radius);
25214        __tmp.put_u8(self.target_system);
25215        __tmp.put_u8(self.target_component);
25216        for val in &self.id_or_mac {
25217            __tmp.put_u8(*val);
25218        }
25219        __tmp.put_u8(self.operator_location_type as u8);
25220        __tmp.put_u8(self.classification_type as u8);
25221        __tmp.put_u8(self.category_eu as u8);
25222        __tmp.put_u8(self.class_eu as u8);
25223        if matches!(version, MavlinkVersion::V2) {
25224            let len = __tmp.len();
25225            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25226        } else {
25227            __tmp.len()
25228        }
25229    }
25230}
25231#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
25232#[doc = ""]
25233#[doc = "ID: 12919"]
25234#[derive(Debug, Clone, PartialEq)]
25235#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25236#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25237#[cfg_attr(feature = "ts", derive(TS))]
25238#[cfg_attr(feature = "ts", ts(export))]
25239pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
25240    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
25241    pub operator_latitude: i32,
25242    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
25243    pub operator_longitude: i32,
25244    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
25245    pub operator_altitude_geo: f32,
25246    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
25247    pub timestamp: u32,
25248    #[doc = "System ID (0 for broadcast)."]
25249    pub target_system: u8,
25250    #[doc = "Component ID (0 for broadcast)."]
25251    pub target_component: u8,
25252}
25253impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
25254    pub const ENCODED_LEN: usize = 18usize;
25255    pub const DEFAULT: Self = Self {
25256        operator_latitude: 0_i32,
25257        operator_longitude: 0_i32,
25258        operator_altitude_geo: 0.0_f32,
25259        timestamp: 0_u32,
25260        target_system: 0_u8,
25261        target_component: 0_u8,
25262    };
25263    #[cfg(feature = "arbitrary")]
25264    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25265        use arbitrary::{Arbitrary, Unstructured};
25266        let mut buf = [0u8; 1024];
25267        rng.fill_bytes(&mut buf);
25268        let mut unstructured = Unstructured::new(&buf);
25269        Self::arbitrary(&mut unstructured).unwrap_or_default()
25270    }
25271}
25272impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
25273    fn default() -> Self {
25274        Self::DEFAULT.clone()
25275    }
25276}
25277impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
25278    type Message = MavMessage;
25279    const ID: u32 = 12919u32;
25280    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
25281    const EXTRA_CRC: u8 = 7u8;
25282    const ENCODED_LEN: usize = 18usize;
25283    fn deser(
25284        _version: MavlinkVersion,
25285        __input: &[u8],
25286    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25287        let avail_len = __input.len();
25288        let mut payload_buf = [0; Self::ENCODED_LEN];
25289        let mut buf = if avail_len < Self::ENCODED_LEN {
25290            payload_buf[0..avail_len].copy_from_slice(__input);
25291            Bytes::new(&payload_buf)
25292        } else {
25293            Bytes::new(__input)
25294        };
25295        let mut __struct = Self::default();
25296        __struct.operator_latitude = buf.get_i32_le()?;
25297        __struct.operator_longitude = buf.get_i32_le()?;
25298        __struct.operator_altitude_geo = buf.get_f32_le()?;
25299        __struct.timestamp = buf.get_u32_le()?;
25300        __struct.target_system = buf.get_u8()?;
25301        __struct.target_component = buf.get_u8()?;
25302        Ok(__struct)
25303    }
25304    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25305        let mut __tmp = BytesMut::new(bytes);
25306        #[allow(clippy::absurd_extreme_comparisons)]
25307        #[allow(unused_comparisons)]
25308        if __tmp.remaining() < Self::ENCODED_LEN {
25309            panic!(
25310                "buffer is too small (need {} bytes, but got {})",
25311                Self::ENCODED_LEN,
25312                __tmp.remaining(),
25313            )
25314        }
25315        __tmp.put_i32_le(self.operator_latitude);
25316        __tmp.put_i32_le(self.operator_longitude);
25317        __tmp.put_f32_le(self.operator_altitude_geo);
25318        __tmp.put_u32_le(self.timestamp);
25319        __tmp.put_u8(self.target_system);
25320        __tmp.put_u8(self.target_component);
25321        if matches!(version, MavlinkVersion::V2) {
25322            let len = __tmp.len();
25323            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25324        } else {
25325            __tmp.len()
25326        }
25327    }
25328}
25329#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
25330#[doc = ""]
25331#[doc = "ID: 100"]
25332#[derive(Debug, Clone, PartialEq)]
25333#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25334#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25335#[cfg_attr(feature = "ts", derive(TS))]
25336#[cfg_attr(feature = "ts", ts(export))]
25337pub struct OPTICAL_FLOW_DATA {
25338    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25339    pub time_usec: u64,
25340    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
25341    pub flow_comp_m_x: f32,
25342    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
25343    pub flow_comp_m_y: f32,
25344    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
25345    pub ground_distance: f32,
25346    #[doc = "Flow in x-sensor direction"]
25347    pub flow_x: i16,
25348    #[doc = "Flow in y-sensor direction"]
25349    pub flow_y: i16,
25350    #[doc = "Sensor ID"]
25351    pub sensor_id: u8,
25352    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
25353    pub quality: u8,
25354    #[doc = "Flow rate about X axis"]
25355    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25356    pub flow_rate_x: f32,
25357    #[doc = "Flow rate about Y axis"]
25358    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25359    pub flow_rate_y: f32,
25360}
25361impl OPTICAL_FLOW_DATA {
25362    pub const ENCODED_LEN: usize = 34usize;
25363    pub const DEFAULT: Self = Self {
25364        time_usec: 0_u64,
25365        flow_comp_m_x: 0.0_f32,
25366        flow_comp_m_y: 0.0_f32,
25367        ground_distance: 0.0_f32,
25368        flow_x: 0_i16,
25369        flow_y: 0_i16,
25370        sensor_id: 0_u8,
25371        quality: 0_u8,
25372        flow_rate_x: 0.0_f32,
25373        flow_rate_y: 0.0_f32,
25374    };
25375    #[cfg(feature = "arbitrary")]
25376    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25377        use arbitrary::{Arbitrary, Unstructured};
25378        let mut buf = [0u8; 1024];
25379        rng.fill_bytes(&mut buf);
25380        let mut unstructured = Unstructured::new(&buf);
25381        Self::arbitrary(&mut unstructured).unwrap_or_default()
25382    }
25383}
25384impl Default for OPTICAL_FLOW_DATA {
25385    fn default() -> Self {
25386        Self::DEFAULT.clone()
25387    }
25388}
25389impl MessageData for OPTICAL_FLOW_DATA {
25390    type Message = MavMessage;
25391    const ID: u32 = 100u32;
25392    const NAME: &'static str = "OPTICAL_FLOW";
25393    const EXTRA_CRC: u8 = 175u8;
25394    const ENCODED_LEN: usize = 34usize;
25395    fn deser(
25396        _version: MavlinkVersion,
25397        __input: &[u8],
25398    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25399        let avail_len = __input.len();
25400        let mut payload_buf = [0; Self::ENCODED_LEN];
25401        let mut buf = if avail_len < Self::ENCODED_LEN {
25402            payload_buf[0..avail_len].copy_from_slice(__input);
25403            Bytes::new(&payload_buf)
25404        } else {
25405            Bytes::new(__input)
25406        };
25407        let mut __struct = Self::default();
25408        __struct.time_usec = buf.get_u64_le()?;
25409        __struct.flow_comp_m_x = buf.get_f32_le()?;
25410        __struct.flow_comp_m_y = buf.get_f32_le()?;
25411        __struct.ground_distance = buf.get_f32_le()?;
25412        __struct.flow_x = buf.get_i16_le()?;
25413        __struct.flow_y = buf.get_i16_le()?;
25414        __struct.sensor_id = buf.get_u8()?;
25415        __struct.quality = buf.get_u8()?;
25416        __struct.flow_rate_x = buf.get_f32_le()?;
25417        __struct.flow_rate_y = buf.get_f32_le()?;
25418        Ok(__struct)
25419    }
25420    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25421        let mut __tmp = BytesMut::new(bytes);
25422        #[allow(clippy::absurd_extreme_comparisons)]
25423        #[allow(unused_comparisons)]
25424        if __tmp.remaining() < Self::ENCODED_LEN {
25425            panic!(
25426                "buffer is too small (need {} bytes, but got {})",
25427                Self::ENCODED_LEN,
25428                __tmp.remaining(),
25429            )
25430        }
25431        __tmp.put_u64_le(self.time_usec);
25432        __tmp.put_f32_le(self.flow_comp_m_x);
25433        __tmp.put_f32_le(self.flow_comp_m_y);
25434        __tmp.put_f32_le(self.ground_distance);
25435        __tmp.put_i16_le(self.flow_x);
25436        __tmp.put_i16_le(self.flow_y);
25437        __tmp.put_u8(self.sensor_id);
25438        __tmp.put_u8(self.quality);
25439        if matches!(version, MavlinkVersion::V2) {
25440            __tmp.put_f32_le(self.flow_rate_x);
25441            __tmp.put_f32_le(self.flow_rate_y);
25442            let len = __tmp.len();
25443            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25444        } else {
25445            __tmp.len()
25446        }
25447    }
25448}
25449#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
25450#[doc = ""]
25451#[doc = "ID: 106"]
25452#[derive(Debug, Clone, PartialEq)]
25453#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25454#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25455#[cfg_attr(feature = "ts", derive(TS))]
25456#[cfg_attr(feature = "ts", ts(export))]
25457pub struct OPTICAL_FLOW_RAD_DATA {
25458    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25459    pub time_usec: u64,
25460    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
25461    pub integration_time_us: u32,
25462    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
25463    pub integrated_x: f32,
25464    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
25465    pub integrated_y: f32,
25466    #[doc = "RH rotation around X axis"]
25467    pub integrated_xgyro: f32,
25468    #[doc = "RH rotation around Y axis"]
25469    pub integrated_ygyro: f32,
25470    #[doc = "RH rotation around Z axis"]
25471    pub integrated_zgyro: f32,
25472    #[doc = "Time since the distance was sampled."]
25473    pub time_delta_distance_us: u32,
25474    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
25475    pub distance: f32,
25476    #[doc = "Temperature"]
25477    pub temperature: i16,
25478    #[doc = "Sensor ID"]
25479    pub sensor_id: u8,
25480    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
25481    pub quality: u8,
25482}
25483impl OPTICAL_FLOW_RAD_DATA {
25484    pub const ENCODED_LEN: usize = 44usize;
25485    pub const DEFAULT: Self = Self {
25486        time_usec: 0_u64,
25487        integration_time_us: 0_u32,
25488        integrated_x: 0.0_f32,
25489        integrated_y: 0.0_f32,
25490        integrated_xgyro: 0.0_f32,
25491        integrated_ygyro: 0.0_f32,
25492        integrated_zgyro: 0.0_f32,
25493        time_delta_distance_us: 0_u32,
25494        distance: 0.0_f32,
25495        temperature: 0_i16,
25496        sensor_id: 0_u8,
25497        quality: 0_u8,
25498    };
25499    #[cfg(feature = "arbitrary")]
25500    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25501        use arbitrary::{Arbitrary, Unstructured};
25502        let mut buf = [0u8; 1024];
25503        rng.fill_bytes(&mut buf);
25504        let mut unstructured = Unstructured::new(&buf);
25505        Self::arbitrary(&mut unstructured).unwrap_or_default()
25506    }
25507}
25508impl Default for OPTICAL_FLOW_RAD_DATA {
25509    fn default() -> Self {
25510        Self::DEFAULT.clone()
25511    }
25512}
25513impl MessageData for OPTICAL_FLOW_RAD_DATA {
25514    type Message = MavMessage;
25515    const ID: u32 = 106u32;
25516    const NAME: &'static str = "OPTICAL_FLOW_RAD";
25517    const EXTRA_CRC: u8 = 138u8;
25518    const ENCODED_LEN: usize = 44usize;
25519    fn deser(
25520        _version: MavlinkVersion,
25521        __input: &[u8],
25522    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25523        let avail_len = __input.len();
25524        let mut payload_buf = [0; Self::ENCODED_LEN];
25525        let mut buf = if avail_len < Self::ENCODED_LEN {
25526            payload_buf[0..avail_len].copy_from_slice(__input);
25527            Bytes::new(&payload_buf)
25528        } else {
25529            Bytes::new(__input)
25530        };
25531        let mut __struct = Self::default();
25532        __struct.time_usec = buf.get_u64_le()?;
25533        __struct.integration_time_us = buf.get_u32_le()?;
25534        __struct.integrated_x = buf.get_f32_le()?;
25535        __struct.integrated_y = buf.get_f32_le()?;
25536        __struct.integrated_xgyro = buf.get_f32_le()?;
25537        __struct.integrated_ygyro = buf.get_f32_le()?;
25538        __struct.integrated_zgyro = buf.get_f32_le()?;
25539        __struct.time_delta_distance_us = buf.get_u32_le()?;
25540        __struct.distance = buf.get_f32_le()?;
25541        __struct.temperature = buf.get_i16_le()?;
25542        __struct.sensor_id = buf.get_u8()?;
25543        __struct.quality = buf.get_u8()?;
25544        Ok(__struct)
25545    }
25546    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25547        let mut __tmp = BytesMut::new(bytes);
25548        #[allow(clippy::absurd_extreme_comparisons)]
25549        #[allow(unused_comparisons)]
25550        if __tmp.remaining() < Self::ENCODED_LEN {
25551            panic!(
25552                "buffer is too small (need {} bytes, but got {})",
25553                Self::ENCODED_LEN,
25554                __tmp.remaining(),
25555            )
25556        }
25557        __tmp.put_u64_le(self.time_usec);
25558        __tmp.put_u32_le(self.integration_time_us);
25559        __tmp.put_f32_le(self.integrated_x);
25560        __tmp.put_f32_le(self.integrated_y);
25561        __tmp.put_f32_le(self.integrated_xgyro);
25562        __tmp.put_f32_le(self.integrated_ygyro);
25563        __tmp.put_f32_le(self.integrated_zgyro);
25564        __tmp.put_u32_le(self.time_delta_distance_us);
25565        __tmp.put_f32_le(self.distance);
25566        __tmp.put_i16_le(self.temperature);
25567        __tmp.put_u8(self.sensor_id);
25568        __tmp.put_u8(self.quality);
25569        if matches!(version, MavlinkVersion::V2) {
25570            let len = __tmp.len();
25571            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25572        } else {
25573            __tmp.len()
25574        }
25575    }
25576}
25577#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
25578#[doc = ""]
25579#[doc = "ID: 360"]
25580#[derive(Debug, Clone, PartialEq)]
25581#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25582#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25583#[cfg_attr(feature = "ts", derive(TS))]
25584#[cfg_attr(feature = "ts", ts(export))]
25585pub struct ORBIT_EXECUTION_STATUS_DATA {
25586    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25587    pub time_usec: u64,
25588    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
25589    pub radius: f32,
25590    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
25591    pub x: i32,
25592    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
25593    pub y: i32,
25594    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
25595    pub z: f32,
25596    #[doc = "The coordinate system of the fields: x, y, z."]
25597    pub frame: MavFrame,
25598}
25599impl ORBIT_EXECUTION_STATUS_DATA {
25600    pub const ENCODED_LEN: usize = 25usize;
25601    pub const DEFAULT: Self = Self {
25602        time_usec: 0_u64,
25603        radius: 0.0_f32,
25604        x: 0_i32,
25605        y: 0_i32,
25606        z: 0.0_f32,
25607        frame: MavFrame::DEFAULT,
25608    };
25609    #[cfg(feature = "arbitrary")]
25610    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25611        use arbitrary::{Arbitrary, Unstructured};
25612        let mut buf = [0u8; 1024];
25613        rng.fill_bytes(&mut buf);
25614        let mut unstructured = Unstructured::new(&buf);
25615        Self::arbitrary(&mut unstructured).unwrap_or_default()
25616    }
25617}
25618impl Default for ORBIT_EXECUTION_STATUS_DATA {
25619    fn default() -> Self {
25620        Self::DEFAULT.clone()
25621    }
25622}
25623impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
25624    type Message = MavMessage;
25625    const ID: u32 = 360u32;
25626    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
25627    const EXTRA_CRC: u8 = 11u8;
25628    const ENCODED_LEN: usize = 25usize;
25629    fn deser(
25630        _version: MavlinkVersion,
25631        __input: &[u8],
25632    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25633        let avail_len = __input.len();
25634        let mut payload_buf = [0; Self::ENCODED_LEN];
25635        let mut buf = if avail_len < Self::ENCODED_LEN {
25636            payload_buf[0..avail_len].copy_from_slice(__input);
25637            Bytes::new(&payload_buf)
25638        } else {
25639            Bytes::new(__input)
25640        };
25641        let mut __struct = Self::default();
25642        __struct.time_usec = buf.get_u64_le()?;
25643        __struct.radius = buf.get_f32_le()?;
25644        __struct.x = buf.get_i32_le()?;
25645        __struct.y = buf.get_i32_le()?;
25646        __struct.z = buf.get_f32_le()?;
25647        let tmp = buf.get_u8()?;
25648        __struct.frame =
25649            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25650                enum_type: "MavFrame",
25651                value: tmp as u64,
25652            })?;
25653        Ok(__struct)
25654    }
25655    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25656        let mut __tmp = BytesMut::new(bytes);
25657        #[allow(clippy::absurd_extreme_comparisons)]
25658        #[allow(unused_comparisons)]
25659        if __tmp.remaining() < Self::ENCODED_LEN {
25660            panic!(
25661                "buffer is too small (need {} bytes, but got {})",
25662                Self::ENCODED_LEN,
25663                __tmp.remaining(),
25664            )
25665        }
25666        __tmp.put_u64_le(self.time_usec);
25667        __tmp.put_f32_le(self.radius);
25668        __tmp.put_i32_le(self.x);
25669        __tmp.put_i32_le(self.y);
25670        __tmp.put_f32_le(self.z);
25671        __tmp.put_u8(self.frame as u8);
25672        if matches!(version, MavlinkVersion::V2) {
25673            let len = __tmp.len();
25674            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25675        } else {
25676            __tmp.len()
25677        }
25678    }
25679}
25680#[doc = "Response from a PARAM_EXT_SET message."]
25681#[doc = ""]
25682#[doc = "ID: 324"]
25683#[derive(Debug, Clone, PartialEq)]
25684#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25685#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25686#[cfg_attr(feature = "ts", derive(TS))]
25687#[cfg_attr(feature = "ts", ts(export))]
25688pub struct PARAM_EXT_ACK_DATA {
25689    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
25690    #[cfg_attr(feature = "ts", ts(type = "string"))]
25691    pub param_id: CharArray<16>,
25692    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
25693    #[cfg_attr(feature = "ts", ts(type = "string"))]
25694    pub param_value: CharArray<128>,
25695    #[doc = "Parameter type."]
25696    pub param_type: MavParamExtType,
25697    #[doc = "Result code."]
25698    pub param_result: ParamAck,
25699}
25700impl PARAM_EXT_ACK_DATA {
25701    pub const ENCODED_LEN: usize = 146usize;
25702    pub const DEFAULT: Self = Self {
25703        param_id: CharArray::new([0_u8; 16usize]),
25704        param_value: CharArray::new([0_u8; 128usize]),
25705        param_type: MavParamExtType::DEFAULT,
25706        param_result: ParamAck::DEFAULT,
25707    };
25708    #[cfg(feature = "arbitrary")]
25709    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25710        use arbitrary::{Arbitrary, Unstructured};
25711        let mut buf = [0u8; 1024];
25712        rng.fill_bytes(&mut buf);
25713        let mut unstructured = Unstructured::new(&buf);
25714        Self::arbitrary(&mut unstructured).unwrap_or_default()
25715    }
25716}
25717impl Default for PARAM_EXT_ACK_DATA {
25718    fn default() -> Self {
25719        Self::DEFAULT.clone()
25720    }
25721}
25722impl MessageData for PARAM_EXT_ACK_DATA {
25723    type Message = MavMessage;
25724    const ID: u32 = 324u32;
25725    const NAME: &'static str = "PARAM_EXT_ACK";
25726    const EXTRA_CRC: u8 = 132u8;
25727    const ENCODED_LEN: usize = 146usize;
25728    fn deser(
25729        _version: MavlinkVersion,
25730        __input: &[u8],
25731    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25732        let avail_len = __input.len();
25733        let mut payload_buf = [0; Self::ENCODED_LEN];
25734        let mut buf = if avail_len < Self::ENCODED_LEN {
25735            payload_buf[0..avail_len].copy_from_slice(__input);
25736            Bytes::new(&payload_buf)
25737        } else {
25738            Bytes::new(__input)
25739        };
25740        let mut __struct = Self::default();
25741        let mut tmp = [0_u8; 16usize];
25742        for v in &mut tmp {
25743            *v = buf.get_u8()?;
25744        }
25745        __struct.param_id = CharArray::new(tmp);
25746        let mut tmp = [0_u8; 128usize];
25747        for v in &mut tmp {
25748            *v = buf.get_u8()?;
25749        }
25750        __struct.param_value = CharArray::new(tmp);
25751        let tmp = buf.get_u8()?;
25752        __struct.param_type =
25753            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25754                enum_type: "MavParamExtType",
25755                value: tmp as u64,
25756            })?;
25757        let tmp = buf.get_u8()?;
25758        __struct.param_result =
25759            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25760                enum_type: "ParamAck",
25761                value: tmp as u64,
25762            })?;
25763        Ok(__struct)
25764    }
25765    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25766        let mut __tmp = BytesMut::new(bytes);
25767        #[allow(clippy::absurd_extreme_comparisons)]
25768        #[allow(unused_comparisons)]
25769        if __tmp.remaining() < Self::ENCODED_LEN {
25770            panic!(
25771                "buffer is too small (need {} bytes, but got {})",
25772                Self::ENCODED_LEN,
25773                __tmp.remaining(),
25774            )
25775        }
25776        for val in &self.param_id {
25777            __tmp.put_u8(*val);
25778        }
25779        for val in &self.param_value {
25780            __tmp.put_u8(*val);
25781        }
25782        __tmp.put_u8(self.param_type as u8);
25783        __tmp.put_u8(self.param_result as u8);
25784        if matches!(version, MavlinkVersion::V2) {
25785            let len = __tmp.len();
25786            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25787        } else {
25788            __tmp.len()
25789        }
25790    }
25791}
25792#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
25793#[doc = ""]
25794#[doc = "ID: 321"]
25795#[derive(Debug, Clone, PartialEq)]
25796#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25797#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25798#[cfg_attr(feature = "ts", derive(TS))]
25799#[cfg_attr(feature = "ts", ts(export))]
25800pub struct PARAM_EXT_REQUEST_LIST_DATA {
25801    #[doc = "System ID"]
25802    pub target_system: u8,
25803    #[doc = "Component ID"]
25804    pub target_component: u8,
25805}
25806impl PARAM_EXT_REQUEST_LIST_DATA {
25807    pub const ENCODED_LEN: usize = 2usize;
25808    pub const DEFAULT: Self = Self {
25809        target_system: 0_u8,
25810        target_component: 0_u8,
25811    };
25812    #[cfg(feature = "arbitrary")]
25813    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25814        use arbitrary::{Arbitrary, Unstructured};
25815        let mut buf = [0u8; 1024];
25816        rng.fill_bytes(&mut buf);
25817        let mut unstructured = Unstructured::new(&buf);
25818        Self::arbitrary(&mut unstructured).unwrap_or_default()
25819    }
25820}
25821impl Default for PARAM_EXT_REQUEST_LIST_DATA {
25822    fn default() -> Self {
25823        Self::DEFAULT.clone()
25824    }
25825}
25826impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
25827    type Message = MavMessage;
25828    const ID: u32 = 321u32;
25829    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
25830    const EXTRA_CRC: u8 = 88u8;
25831    const ENCODED_LEN: usize = 2usize;
25832    fn deser(
25833        _version: MavlinkVersion,
25834        __input: &[u8],
25835    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25836        let avail_len = __input.len();
25837        let mut payload_buf = [0; Self::ENCODED_LEN];
25838        let mut buf = if avail_len < Self::ENCODED_LEN {
25839            payload_buf[0..avail_len].copy_from_slice(__input);
25840            Bytes::new(&payload_buf)
25841        } else {
25842            Bytes::new(__input)
25843        };
25844        let mut __struct = Self::default();
25845        __struct.target_system = buf.get_u8()?;
25846        __struct.target_component = buf.get_u8()?;
25847        Ok(__struct)
25848    }
25849    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25850        let mut __tmp = BytesMut::new(bytes);
25851        #[allow(clippy::absurd_extreme_comparisons)]
25852        #[allow(unused_comparisons)]
25853        if __tmp.remaining() < Self::ENCODED_LEN {
25854            panic!(
25855                "buffer is too small (need {} bytes, but got {})",
25856                Self::ENCODED_LEN,
25857                __tmp.remaining(),
25858            )
25859        }
25860        __tmp.put_u8(self.target_system);
25861        __tmp.put_u8(self.target_component);
25862        if matches!(version, MavlinkVersion::V2) {
25863            let len = __tmp.len();
25864            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25865        } else {
25866            __tmp.len()
25867        }
25868    }
25869}
25870#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
25871#[doc = ""]
25872#[doc = "ID: 320"]
25873#[derive(Debug, Clone, PartialEq)]
25874#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25875#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25876#[cfg_attr(feature = "ts", derive(TS))]
25877#[cfg_attr(feature = "ts", ts(export))]
25878pub struct PARAM_EXT_REQUEST_READ_DATA {
25879    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
25880    pub param_index: i16,
25881    #[doc = "System ID"]
25882    pub target_system: u8,
25883    #[doc = "Component ID"]
25884    pub target_component: u8,
25885    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
25886    #[cfg_attr(feature = "ts", ts(type = "string"))]
25887    pub param_id: CharArray<16>,
25888}
25889impl PARAM_EXT_REQUEST_READ_DATA {
25890    pub const ENCODED_LEN: usize = 20usize;
25891    pub const DEFAULT: Self = Self {
25892        param_index: 0_i16,
25893        target_system: 0_u8,
25894        target_component: 0_u8,
25895        param_id: CharArray::new([0_u8; 16usize]),
25896    };
25897    #[cfg(feature = "arbitrary")]
25898    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25899        use arbitrary::{Arbitrary, Unstructured};
25900        let mut buf = [0u8; 1024];
25901        rng.fill_bytes(&mut buf);
25902        let mut unstructured = Unstructured::new(&buf);
25903        Self::arbitrary(&mut unstructured).unwrap_or_default()
25904    }
25905}
25906impl Default for PARAM_EXT_REQUEST_READ_DATA {
25907    fn default() -> Self {
25908        Self::DEFAULT.clone()
25909    }
25910}
25911impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
25912    type Message = MavMessage;
25913    const ID: u32 = 320u32;
25914    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
25915    const EXTRA_CRC: u8 = 243u8;
25916    const ENCODED_LEN: usize = 20usize;
25917    fn deser(
25918        _version: MavlinkVersion,
25919        __input: &[u8],
25920    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25921        let avail_len = __input.len();
25922        let mut payload_buf = [0; Self::ENCODED_LEN];
25923        let mut buf = if avail_len < Self::ENCODED_LEN {
25924            payload_buf[0..avail_len].copy_from_slice(__input);
25925            Bytes::new(&payload_buf)
25926        } else {
25927            Bytes::new(__input)
25928        };
25929        let mut __struct = Self::default();
25930        __struct.param_index = buf.get_i16_le()?;
25931        __struct.target_system = buf.get_u8()?;
25932        __struct.target_component = buf.get_u8()?;
25933        let mut tmp = [0_u8; 16usize];
25934        for v in &mut tmp {
25935            *v = buf.get_u8()?;
25936        }
25937        __struct.param_id = CharArray::new(tmp);
25938        Ok(__struct)
25939    }
25940    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25941        let mut __tmp = BytesMut::new(bytes);
25942        #[allow(clippy::absurd_extreme_comparisons)]
25943        #[allow(unused_comparisons)]
25944        if __tmp.remaining() < Self::ENCODED_LEN {
25945            panic!(
25946                "buffer is too small (need {} bytes, but got {})",
25947                Self::ENCODED_LEN,
25948                __tmp.remaining(),
25949            )
25950        }
25951        __tmp.put_i16_le(self.param_index);
25952        __tmp.put_u8(self.target_system);
25953        __tmp.put_u8(self.target_component);
25954        for val in &self.param_id {
25955            __tmp.put_u8(*val);
25956        }
25957        if matches!(version, MavlinkVersion::V2) {
25958            let len = __tmp.len();
25959            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25960        } else {
25961            __tmp.len()
25962        }
25963    }
25964}
25965#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
25966#[doc = ""]
25967#[doc = "ID: 323"]
25968#[derive(Debug, Clone, PartialEq)]
25969#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25970#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25971#[cfg_attr(feature = "ts", derive(TS))]
25972#[cfg_attr(feature = "ts", ts(export))]
25973pub struct PARAM_EXT_SET_DATA {
25974    #[doc = "System ID"]
25975    pub target_system: u8,
25976    #[doc = "Component ID"]
25977    pub target_component: u8,
25978    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
25979    #[cfg_attr(feature = "ts", ts(type = "string"))]
25980    pub param_id: CharArray<16>,
25981    #[doc = "Parameter value"]
25982    #[cfg_attr(feature = "ts", ts(type = "string"))]
25983    pub param_value: CharArray<128>,
25984    #[doc = "Parameter type."]
25985    pub param_type: MavParamExtType,
25986}
25987impl PARAM_EXT_SET_DATA {
25988    pub const ENCODED_LEN: usize = 147usize;
25989    pub const DEFAULT: Self = Self {
25990        target_system: 0_u8,
25991        target_component: 0_u8,
25992        param_id: CharArray::new([0_u8; 16usize]),
25993        param_value: CharArray::new([0_u8; 128usize]),
25994        param_type: MavParamExtType::DEFAULT,
25995    };
25996    #[cfg(feature = "arbitrary")]
25997    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25998        use arbitrary::{Arbitrary, Unstructured};
25999        let mut buf = [0u8; 1024];
26000        rng.fill_bytes(&mut buf);
26001        let mut unstructured = Unstructured::new(&buf);
26002        Self::arbitrary(&mut unstructured).unwrap_or_default()
26003    }
26004}
26005impl Default for PARAM_EXT_SET_DATA {
26006    fn default() -> Self {
26007        Self::DEFAULT.clone()
26008    }
26009}
26010impl MessageData for PARAM_EXT_SET_DATA {
26011    type Message = MavMessage;
26012    const ID: u32 = 323u32;
26013    const NAME: &'static str = "PARAM_EXT_SET";
26014    const EXTRA_CRC: u8 = 78u8;
26015    const ENCODED_LEN: usize = 147usize;
26016    fn deser(
26017        _version: MavlinkVersion,
26018        __input: &[u8],
26019    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26020        let avail_len = __input.len();
26021        let mut payload_buf = [0; Self::ENCODED_LEN];
26022        let mut buf = if avail_len < Self::ENCODED_LEN {
26023            payload_buf[0..avail_len].copy_from_slice(__input);
26024            Bytes::new(&payload_buf)
26025        } else {
26026            Bytes::new(__input)
26027        };
26028        let mut __struct = Self::default();
26029        __struct.target_system = buf.get_u8()?;
26030        __struct.target_component = buf.get_u8()?;
26031        let mut tmp = [0_u8; 16usize];
26032        for v in &mut tmp {
26033            *v = buf.get_u8()?;
26034        }
26035        __struct.param_id = CharArray::new(tmp);
26036        let mut tmp = [0_u8; 128usize];
26037        for v in &mut tmp {
26038            *v = buf.get_u8()?;
26039        }
26040        __struct.param_value = CharArray::new(tmp);
26041        let tmp = buf.get_u8()?;
26042        __struct.param_type =
26043            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26044                enum_type: "MavParamExtType",
26045                value: tmp as u64,
26046            })?;
26047        Ok(__struct)
26048    }
26049    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26050        let mut __tmp = BytesMut::new(bytes);
26051        #[allow(clippy::absurd_extreme_comparisons)]
26052        #[allow(unused_comparisons)]
26053        if __tmp.remaining() < Self::ENCODED_LEN {
26054            panic!(
26055                "buffer is too small (need {} bytes, but got {})",
26056                Self::ENCODED_LEN,
26057                __tmp.remaining(),
26058            )
26059        }
26060        __tmp.put_u8(self.target_system);
26061        __tmp.put_u8(self.target_component);
26062        for val in &self.param_id {
26063            __tmp.put_u8(*val);
26064        }
26065        for val in &self.param_value {
26066            __tmp.put_u8(*val);
26067        }
26068        __tmp.put_u8(self.param_type as u8);
26069        if matches!(version, MavlinkVersion::V2) {
26070            let len = __tmp.len();
26071            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26072        } else {
26073            __tmp.len()
26074        }
26075    }
26076}
26077#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
26078#[doc = ""]
26079#[doc = "ID: 322"]
26080#[derive(Debug, Clone, PartialEq)]
26081#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26082#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26083#[cfg_attr(feature = "ts", derive(TS))]
26084#[cfg_attr(feature = "ts", ts(export))]
26085pub struct PARAM_EXT_VALUE_DATA {
26086    #[doc = "Total number of parameters"]
26087    pub param_count: u16,
26088    #[doc = "Index of this parameter"]
26089    pub param_index: u16,
26090    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
26091    #[cfg_attr(feature = "ts", ts(type = "string"))]
26092    pub param_id: CharArray<16>,
26093    #[doc = "Parameter value"]
26094    #[cfg_attr(feature = "ts", ts(type = "string"))]
26095    pub param_value: CharArray<128>,
26096    #[doc = "Parameter type."]
26097    pub param_type: MavParamExtType,
26098}
26099impl PARAM_EXT_VALUE_DATA {
26100    pub const ENCODED_LEN: usize = 149usize;
26101    pub const DEFAULT: Self = Self {
26102        param_count: 0_u16,
26103        param_index: 0_u16,
26104        param_id: CharArray::new([0_u8; 16usize]),
26105        param_value: CharArray::new([0_u8; 128usize]),
26106        param_type: MavParamExtType::DEFAULT,
26107    };
26108    #[cfg(feature = "arbitrary")]
26109    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26110        use arbitrary::{Arbitrary, Unstructured};
26111        let mut buf = [0u8; 1024];
26112        rng.fill_bytes(&mut buf);
26113        let mut unstructured = Unstructured::new(&buf);
26114        Self::arbitrary(&mut unstructured).unwrap_or_default()
26115    }
26116}
26117impl Default for PARAM_EXT_VALUE_DATA {
26118    fn default() -> Self {
26119        Self::DEFAULT.clone()
26120    }
26121}
26122impl MessageData for PARAM_EXT_VALUE_DATA {
26123    type Message = MavMessage;
26124    const ID: u32 = 322u32;
26125    const NAME: &'static str = "PARAM_EXT_VALUE";
26126    const EXTRA_CRC: u8 = 243u8;
26127    const ENCODED_LEN: usize = 149usize;
26128    fn deser(
26129        _version: MavlinkVersion,
26130        __input: &[u8],
26131    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26132        let avail_len = __input.len();
26133        let mut payload_buf = [0; Self::ENCODED_LEN];
26134        let mut buf = if avail_len < Self::ENCODED_LEN {
26135            payload_buf[0..avail_len].copy_from_slice(__input);
26136            Bytes::new(&payload_buf)
26137        } else {
26138            Bytes::new(__input)
26139        };
26140        let mut __struct = Self::default();
26141        __struct.param_count = buf.get_u16_le()?;
26142        __struct.param_index = buf.get_u16_le()?;
26143        let mut tmp = [0_u8; 16usize];
26144        for v in &mut tmp {
26145            *v = buf.get_u8()?;
26146        }
26147        __struct.param_id = CharArray::new(tmp);
26148        let mut tmp = [0_u8; 128usize];
26149        for v in &mut tmp {
26150            *v = buf.get_u8()?;
26151        }
26152        __struct.param_value = CharArray::new(tmp);
26153        let tmp = buf.get_u8()?;
26154        __struct.param_type =
26155            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26156                enum_type: "MavParamExtType",
26157                value: tmp as u64,
26158            })?;
26159        Ok(__struct)
26160    }
26161    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26162        let mut __tmp = BytesMut::new(bytes);
26163        #[allow(clippy::absurd_extreme_comparisons)]
26164        #[allow(unused_comparisons)]
26165        if __tmp.remaining() < Self::ENCODED_LEN {
26166            panic!(
26167                "buffer is too small (need {} bytes, but got {})",
26168                Self::ENCODED_LEN,
26169                __tmp.remaining(),
26170            )
26171        }
26172        __tmp.put_u16_le(self.param_count);
26173        __tmp.put_u16_le(self.param_index);
26174        for val in &self.param_id {
26175            __tmp.put_u8(*val);
26176        }
26177        for val in &self.param_value {
26178            __tmp.put_u8(*val);
26179        }
26180        __tmp.put_u8(self.param_type as u8);
26181        if matches!(version, MavlinkVersion::V2) {
26182            let len = __tmp.len();
26183            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26184        } else {
26185            __tmp.len()
26186        }
26187    }
26188}
26189#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
26190#[doc = ""]
26191#[doc = "ID: 50"]
26192#[derive(Debug, Clone, PartialEq)]
26193#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26194#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26195#[cfg_attr(feature = "ts", derive(TS))]
26196#[cfg_attr(feature = "ts", ts(export))]
26197pub struct PARAM_MAP_RC_DATA {
26198    #[doc = "Initial parameter value"]
26199    pub param_value0: f32,
26200    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
26201    pub scale: f32,
26202    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
26203    pub param_value_min: f32,
26204    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
26205    pub param_value_max: f32,
26206    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
26207    pub param_index: i16,
26208    #[doc = "System ID"]
26209    pub target_system: u8,
26210    #[doc = "Component ID"]
26211    pub target_component: u8,
26212    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
26213    #[cfg_attr(feature = "ts", ts(type = "string"))]
26214    pub param_id: CharArray<16>,
26215    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
26216    pub parameter_rc_channel_index: u8,
26217}
26218impl PARAM_MAP_RC_DATA {
26219    pub const ENCODED_LEN: usize = 37usize;
26220    pub const DEFAULT: Self = Self {
26221        param_value0: 0.0_f32,
26222        scale: 0.0_f32,
26223        param_value_min: 0.0_f32,
26224        param_value_max: 0.0_f32,
26225        param_index: 0_i16,
26226        target_system: 0_u8,
26227        target_component: 0_u8,
26228        param_id: CharArray::new([0_u8; 16usize]),
26229        parameter_rc_channel_index: 0_u8,
26230    };
26231    #[cfg(feature = "arbitrary")]
26232    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26233        use arbitrary::{Arbitrary, Unstructured};
26234        let mut buf = [0u8; 1024];
26235        rng.fill_bytes(&mut buf);
26236        let mut unstructured = Unstructured::new(&buf);
26237        Self::arbitrary(&mut unstructured).unwrap_or_default()
26238    }
26239}
26240impl Default for PARAM_MAP_RC_DATA {
26241    fn default() -> Self {
26242        Self::DEFAULT.clone()
26243    }
26244}
26245impl MessageData for PARAM_MAP_RC_DATA {
26246    type Message = MavMessage;
26247    const ID: u32 = 50u32;
26248    const NAME: &'static str = "PARAM_MAP_RC";
26249    const EXTRA_CRC: u8 = 78u8;
26250    const ENCODED_LEN: usize = 37usize;
26251    fn deser(
26252        _version: MavlinkVersion,
26253        __input: &[u8],
26254    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26255        let avail_len = __input.len();
26256        let mut payload_buf = [0; Self::ENCODED_LEN];
26257        let mut buf = if avail_len < Self::ENCODED_LEN {
26258            payload_buf[0..avail_len].copy_from_slice(__input);
26259            Bytes::new(&payload_buf)
26260        } else {
26261            Bytes::new(__input)
26262        };
26263        let mut __struct = Self::default();
26264        __struct.param_value0 = buf.get_f32_le()?;
26265        __struct.scale = buf.get_f32_le()?;
26266        __struct.param_value_min = buf.get_f32_le()?;
26267        __struct.param_value_max = buf.get_f32_le()?;
26268        __struct.param_index = buf.get_i16_le()?;
26269        __struct.target_system = buf.get_u8()?;
26270        __struct.target_component = buf.get_u8()?;
26271        let mut tmp = [0_u8; 16usize];
26272        for v in &mut tmp {
26273            *v = buf.get_u8()?;
26274        }
26275        __struct.param_id = CharArray::new(tmp);
26276        __struct.parameter_rc_channel_index = buf.get_u8()?;
26277        Ok(__struct)
26278    }
26279    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26280        let mut __tmp = BytesMut::new(bytes);
26281        #[allow(clippy::absurd_extreme_comparisons)]
26282        #[allow(unused_comparisons)]
26283        if __tmp.remaining() < Self::ENCODED_LEN {
26284            panic!(
26285                "buffer is too small (need {} bytes, but got {})",
26286                Self::ENCODED_LEN,
26287                __tmp.remaining(),
26288            )
26289        }
26290        __tmp.put_f32_le(self.param_value0);
26291        __tmp.put_f32_le(self.scale);
26292        __tmp.put_f32_le(self.param_value_min);
26293        __tmp.put_f32_le(self.param_value_max);
26294        __tmp.put_i16_le(self.param_index);
26295        __tmp.put_u8(self.target_system);
26296        __tmp.put_u8(self.target_component);
26297        for val in &self.param_id {
26298            __tmp.put_u8(*val);
26299        }
26300        __tmp.put_u8(self.parameter_rc_channel_index);
26301        if matches!(version, MavlinkVersion::V2) {
26302            let len = __tmp.len();
26303            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26304        } else {
26305            __tmp.len()
26306        }
26307    }
26308}
26309#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
26310#[doc = ""]
26311#[doc = "ID: 21"]
26312#[derive(Debug, Clone, PartialEq)]
26313#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26314#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26315#[cfg_attr(feature = "ts", derive(TS))]
26316#[cfg_attr(feature = "ts", ts(export))]
26317pub struct PARAM_REQUEST_LIST_DATA {
26318    #[doc = "System ID"]
26319    pub target_system: u8,
26320    #[doc = "Component ID"]
26321    pub target_component: u8,
26322}
26323impl PARAM_REQUEST_LIST_DATA {
26324    pub const ENCODED_LEN: usize = 2usize;
26325    pub const DEFAULT: Self = Self {
26326        target_system: 0_u8,
26327        target_component: 0_u8,
26328    };
26329    #[cfg(feature = "arbitrary")]
26330    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26331        use arbitrary::{Arbitrary, Unstructured};
26332        let mut buf = [0u8; 1024];
26333        rng.fill_bytes(&mut buf);
26334        let mut unstructured = Unstructured::new(&buf);
26335        Self::arbitrary(&mut unstructured).unwrap_or_default()
26336    }
26337}
26338impl Default for PARAM_REQUEST_LIST_DATA {
26339    fn default() -> Self {
26340        Self::DEFAULT.clone()
26341    }
26342}
26343impl MessageData for PARAM_REQUEST_LIST_DATA {
26344    type Message = MavMessage;
26345    const ID: u32 = 21u32;
26346    const NAME: &'static str = "PARAM_REQUEST_LIST";
26347    const EXTRA_CRC: u8 = 159u8;
26348    const ENCODED_LEN: usize = 2usize;
26349    fn deser(
26350        _version: MavlinkVersion,
26351        __input: &[u8],
26352    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26353        let avail_len = __input.len();
26354        let mut payload_buf = [0; Self::ENCODED_LEN];
26355        let mut buf = if avail_len < Self::ENCODED_LEN {
26356            payload_buf[0..avail_len].copy_from_slice(__input);
26357            Bytes::new(&payload_buf)
26358        } else {
26359            Bytes::new(__input)
26360        };
26361        let mut __struct = Self::default();
26362        __struct.target_system = buf.get_u8()?;
26363        __struct.target_component = buf.get_u8()?;
26364        Ok(__struct)
26365    }
26366    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26367        let mut __tmp = BytesMut::new(bytes);
26368        #[allow(clippy::absurd_extreme_comparisons)]
26369        #[allow(unused_comparisons)]
26370        if __tmp.remaining() < Self::ENCODED_LEN {
26371            panic!(
26372                "buffer is too small (need {} bytes, but got {})",
26373                Self::ENCODED_LEN,
26374                __tmp.remaining(),
26375            )
26376        }
26377        __tmp.put_u8(self.target_system);
26378        __tmp.put_u8(self.target_component);
26379        if matches!(version, MavlinkVersion::V2) {
26380            let len = __tmp.len();
26381            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26382        } else {
26383            __tmp.len()
26384        }
26385    }
26386}
26387#[doc = "Request to read the onboard parameter with the param_id string id. Onboard parameters are stored as key[const char*] -&gt;value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
26388#[doc = ""]
26389#[doc = "ID: 20"]
26390#[derive(Debug, Clone, PartialEq)]
26391#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26392#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26393#[cfg_attr(feature = "ts", derive(TS))]
26394#[cfg_attr(feature = "ts", ts(export))]
26395pub struct PARAM_REQUEST_READ_DATA {
26396    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
26397    pub param_index: i16,
26398    #[doc = "System ID"]
26399    pub target_system: u8,
26400    #[doc = "Component ID"]
26401    pub target_component: u8,
26402    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
26403    #[cfg_attr(feature = "ts", ts(type = "string"))]
26404    pub param_id: CharArray<16>,
26405}
26406impl PARAM_REQUEST_READ_DATA {
26407    pub const ENCODED_LEN: usize = 20usize;
26408    pub const DEFAULT: Self = Self {
26409        param_index: 0_i16,
26410        target_system: 0_u8,
26411        target_component: 0_u8,
26412        param_id: CharArray::new([0_u8; 16usize]),
26413    };
26414    #[cfg(feature = "arbitrary")]
26415    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26416        use arbitrary::{Arbitrary, Unstructured};
26417        let mut buf = [0u8; 1024];
26418        rng.fill_bytes(&mut buf);
26419        let mut unstructured = Unstructured::new(&buf);
26420        Self::arbitrary(&mut unstructured).unwrap_or_default()
26421    }
26422}
26423impl Default for PARAM_REQUEST_READ_DATA {
26424    fn default() -> Self {
26425        Self::DEFAULT.clone()
26426    }
26427}
26428impl MessageData for PARAM_REQUEST_READ_DATA {
26429    type Message = MavMessage;
26430    const ID: u32 = 20u32;
26431    const NAME: &'static str = "PARAM_REQUEST_READ";
26432    const EXTRA_CRC: u8 = 214u8;
26433    const ENCODED_LEN: usize = 20usize;
26434    fn deser(
26435        _version: MavlinkVersion,
26436        __input: &[u8],
26437    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26438        let avail_len = __input.len();
26439        let mut payload_buf = [0; Self::ENCODED_LEN];
26440        let mut buf = if avail_len < Self::ENCODED_LEN {
26441            payload_buf[0..avail_len].copy_from_slice(__input);
26442            Bytes::new(&payload_buf)
26443        } else {
26444            Bytes::new(__input)
26445        };
26446        let mut __struct = Self::default();
26447        __struct.param_index = buf.get_i16_le()?;
26448        __struct.target_system = buf.get_u8()?;
26449        __struct.target_component = buf.get_u8()?;
26450        let mut tmp = [0_u8; 16usize];
26451        for v in &mut tmp {
26452            *v = buf.get_u8()?;
26453        }
26454        __struct.param_id = CharArray::new(tmp);
26455        Ok(__struct)
26456    }
26457    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26458        let mut __tmp = BytesMut::new(bytes);
26459        #[allow(clippy::absurd_extreme_comparisons)]
26460        #[allow(unused_comparisons)]
26461        if __tmp.remaining() < Self::ENCODED_LEN {
26462            panic!(
26463                "buffer is too small (need {} bytes, but got {})",
26464                Self::ENCODED_LEN,
26465                __tmp.remaining(),
26466            )
26467        }
26468        __tmp.put_i16_le(self.param_index);
26469        __tmp.put_u8(self.target_system);
26470        __tmp.put_u8(self.target_component);
26471        for val in &self.param_id {
26472            __tmp.put_u8(*val);
26473        }
26474        if matches!(version, MavlinkVersion::V2) {
26475            let len = __tmp.len();
26476            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26477        } else {
26478            __tmp.len()
26479        }
26480    }
26481}
26482#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
26483#[doc = ""]
26484#[doc = "ID: 23"]
26485#[derive(Debug, Clone, PartialEq)]
26486#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26487#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26488#[cfg_attr(feature = "ts", derive(TS))]
26489#[cfg_attr(feature = "ts", ts(export))]
26490pub struct PARAM_SET_DATA {
26491    #[doc = "Onboard parameter value"]
26492    pub param_value: f32,
26493    #[doc = "System ID"]
26494    pub target_system: u8,
26495    #[doc = "Component ID"]
26496    pub target_component: u8,
26497    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
26498    #[cfg_attr(feature = "ts", ts(type = "string"))]
26499    pub param_id: CharArray<16>,
26500    #[doc = "Onboard parameter type."]
26501    pub param_type: MavParamType,
26502}
26503impl PARAM_SET_DATA {
26504    pub const ENCODED_LEN: usize = 23usize;
26505    pub const DEFAULT: Self = Self {
26506        param_value: 0.0_f32,
26507        target_system: 0_u8,
26508        target_component: 0_u8,
26509        param_id: CharArray::new([0_u8; 16usize]),
26510        param_type: MavParamType::DEFAULT,
26511    };
26512    #[cfg(feature = "arbitrary")]
26513    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26514        use arbitrary::{Arbitrary, Unstructured};
26515        let mut buf = [0u8; 1024];
26516        rng.fill_bytes(&mut buf);
26517        let mut unstructured = Unstructured::new(&buf);
26518        Self::arbitrary(&mut unstructured).unwrap_or_default()
26519    }
26520}
26521impl Default for PARAM_SET_DATA {
26522    fn default() -> Self {
26523        Self::DEFAULT.clone()
26524    }
26525}
26526impl MessageData for PARAM_SET_DATA {
26527    type Message = MavMessage;
26528    const ID: u32 = 23u32;
26529    const NAME: &'static str = "PARAM_SET";
26530    const EXTRA_CRC: u8 = 168u8;
26531    const ENCODED_LEN: usize = 23usize;
26532    fn deser(
26533        _version: MavlinkVersion,
26534        __input: &[u8],
26535    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26536        let avail_len = __input.len();
26537        let mut payload_buf = [0; Self::ENCODED_LEN];
26538        let mut buf = if avail_len < Self::ENCODED_LEN {
26539            payload_buf[0..avail_len].copy_from_slice(__input);
26540            Bytes::new(&payload_buf)
26541        } else {
26542            Bytes::new(__input)
26543        };
26544        let mut __struct = Self::default();
26545        __struct.param_value = buf.get_f32_le()?;
26546        __struct.target_system = buf.get_u8()?;
26547        __struct.target_component = buf.get_u8()?;
26548        let mut tmp = [0_u8; 16usize];
26549        for v in &mut tmp {
26550            *v = buf.get_u8()?;
26551        }
26552        __struct.param_id = CharArray::new(tmp);
26553        let tmp = buf.get_u8()?;
26554        __struct.param_type =
26555            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26556                enum_type: "MavParamType",
26557                value: tmp as u64,
26558            })?;
26559        Ok(__struct)
26560    }
26561    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26562        let mut __tmp = BytesMut::new(bytes);
26563        #[allow(clippy::absurd_extreme_comparisons)]
26564        #[allow(unused_comparisons)]
26565        if __tmp.remaining() < Self::ENCODED_LEN {
26566            panic!(
26567                "buffer is too small (need {} bytes, but got {})",
26568                Self::ENCODED_LEN,
26569                __tmp.remaining(),
26570            )
26571        }
26572        __tmp.put_f32_le(self.param_value);
26573        __tmp.put_u8(self.target_system);
26574        __tmp.put_u8(self.target_component);
26575        for val in &self.param_id {
26576            __tmp.put_u8(*val);
26577        }
26578        __tmp.put_u8(self.param_type as u8);
26579        if matches!(version, MavlinkVersion::V2) {
26580            let len = __tmp.len();
26581            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26582        } else {
26583            __tmp.len()
26584        }
26585    }
26586}
26587#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
26588#[doc = ""]
26589#[doc = "ID: 22"]
26590#[derive(Debug, Clone, PartialEq)]
26591#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26592#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26593#[cfg_attr(feature = "ts", derive(TS))]
26594#[cfg_attr(feature = "ts", ts(export))]
26595pub struct PARAM_VALUE_DATA {
26596    #[doc = "Onboard parameter value"]
26597    pub param_value: f32,
26598    #[doc = "Total number of onboard parameters"]
26599    pub param_count: u16,
26600    #[doc = "Index of this onboard parameter"]
26601    pub param_index: u16,
26602    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
26603    #[cfg_attr(feature = "ts", ts(type = "string"))]
26604    pub param_id: CharArray<16>,
26605    #[doc = "Onboard parameter type."]
26606    pub param_type: MavParamType,
26607}
26608impl PARAM_VALUE_DATA {
26609    pub const ENCODED_LEN: usize = 25usize;
26610    pub const DEFAULT: Self = Self {
26611        param_value: 0.0_f32,
26612        param_count: 0_u16,
26613        param_index: 0_u16,
26614        param_id: CharArray::new([0_u8; 16usize]),
26615        param_type: MavParamType::DEFAULT,
26616    };
26617    #[cfg(feature = "arbitrary")]
26618    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26619        use arbitrary::{Arbitrary, Unstructured};
26620        let mut buf = [0u8; 1024];
26621        rng.fill_bytes(&mut buf);
26622        let mut unstructured = Unstructured::new(&buf);
26623        Self::arbitrary(&mut unstructured).unwrap_or_default()
26624    }
26625}
26626impl Default for PARAM_VALUE_DATA {
26627    fn default() -> Self {
26628        Self::DEFAULT.clone()
26629    }
26630}
26631impl MessageData for PARAM_VALUE_DATA {
26632    type Message = MavMessage;
26633    const ID: u32 = 22u32;
26634    const NAME: &'static str = "PARAM_VALUE";
26635    const EXTRA_CRC: u8 = 220u8;
26636    const ENCODED_LEN: usize = 25usize;
26637    fn deser(
26638        _version: MavlinkVersion,
26639        __input: &[u8],
26640    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26641        let avail_len = __input.len();
26642        let mut payload_buf = [0; Self::ENCODED_LEN];
26643        let mut buf = if avail_len < Self::ENCODED_LEN {
26644            payload_buf[0..avail_len].copy_from_slice(__input);
26645            Bytes::new(&payload_buf)
26646        } else {
26647            Bytes::new(__input)
26648        };
26649        let mut __struct = Self::default();
26650        __struct.param_value = buf.get_f32_le()?;
26651        __struct.param_count = buf.get_u16_le()?;
26652        __struct.param_index = buf.get_u16_le()?;
26653        let mut tmp = [0_u8; 16usize];
26654        for v in &mut tmp {
26655            *v = buf.get_u8()?;
26656        }
26657        __struct.param_id = CharArray::new(tmp);
26658        let tmp = buf.get_u8()?;
26659        __struct.param_type =
26660            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26661                enum_type: "MavParamType",
26662                value: tmp as u64,
26663            })?;
26664        Ok(__struct)
26665    }
26666    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26667        let mut __tmp = BytesMut::new(bytes);
26668        #[allow(clippy::absurd_extreme_comparisons)]
26669        #[allow(unused_comparisons)]
26670        if __tmp.remaining() < Self::ENCODED_LEN {
26671            panic!(
26672                "buffer is too small (need {} bytes, but got {})",
26673                Self::ENCODED_LEN,
26674                __tmp.remaining(),
26675            )
26676        }
26677        __tmp.put_f32_le(self.param_value);
26678        __tmp.put_u16_le(self.param_count);
26679        __tmp.put_u16_le(self.param_index);
26680        for val in &self.param_id {
26681            __tmp.put_u8(*val);
26682        }
26683        __tmp.put_u8(self.param_type as u8);
26684        if matches!(version, MavlinkVersion::V2) {
26685            let len = __tmp.len();
26686            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26687        } else {
26688            __tmp.len()
26689        }
26690    }
26691}
26692#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
26693#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
26694#[doc = ""]
26695#[doc = "ID: 4"]
26696#[derive(Debug, Clone, PartialEq)]
26697#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26698#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26699#[cfg_attr(feature = "ts", derive(TS))]
26700#[cfg_attr(feature = "ts", ts(export))]
26701pub struct PING_DATA {
26702    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
26703    pub time_usec: u64,
26704    #[doc = "PING sequence"]
26705    pub seq: u32,
26706    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
26707    pub target_system: u8,
26708    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
26709    pub target_component: u8,
26710}
26711impl PING_DATA {
26712    pub const ENCODED_LEN: usize = 14usize;
26713    pub const DEFAULT: Self = Self {
26714        time_usec: 0_u64,
26715        seq: 0_u32,
26716        target_system: 0_u8,
26717        target_component: 0_u8,
26718    };
26719    #[cfg(feature = "arbitrary")]
26720    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26721        use arbitrary::{Arbitrary, Unstructured};
26722        let mut buf = [0u8; 1024];
26723        rng.fill_bytes(&mut buf);
26724        let mut unstructured = Unstructured::new(&buf);
26725        Self::arbitrary(&mut unstructured).unwrap_or_default()
26726    }
26727}
26728impl Default for PING_DATA {
26729    fn default() -> Self {
26730        Self::DEFAULT.clone()
26731    }
26732}
26733impl MessageData for PING_DATA {
26734    type Message = MavMessage;
26735    const ID: u32 = 4u32;
26736    const NAME: &'static str = "PING";
26737    const EXTRA_CRC: u8 = 237u8;
26738    const ENCODED_LEN: usize = 14usize;
26739    fn deser(
26740        _version: MavlinkVersion,
26741        __input: &[u8],
26742    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26743        let avail_len = __input.len();
26744        let mut payload_buf = [0; Self::ENCODED_LEN];
26745        let mut buf = if avail_len < Self::ENCODED_LEN {
26746            payload_buf[0..avail_len].copy_from_slice(__input);
26747            Bytes::new(&payload_buf)
26748        } else {
26749            Bytes::new(__input)
26750        };
26751        let mut __struct = Self::default();
26752        __struct.time_usec = buf.get_u64_le()?;
26753        __struct.seq = buf.get_u32_le()?;
26754        __struct.target_system = buf.get_u8()?;
26755        __struct.target_component = buf.get_u8()?;
26756        Ok(__struct)
26757    }
26758    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26759        let mut __tmp = BytesMut::new(bytes);
26760        #[allow(clippy::absurd_extreme_comparisons)]
26761        #[allow(unused_comparisons)]
26762        if __tmp.remaining() < Self::ENCODED_LEN {
26763            panic!(
26764                "buffer is too small (need {} bytes, but got {})",
26765                Self::ENCODED_LEN,
26766                __tmp.remaining(),
26767            )
26768        }
26769        __tmp.put_u64_le(self.time_usec);
26770        __tmp.put_u32_le(self.seq);
26771        __tmp.put_u8(self.target_system);
26772        __tmp.put_u8(self.target_component);
26773        if matches!(version, MavlinkVersion::V2) {
26774            let len = __tmp.len();
26775            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26776        } else {
26777            __tmp.len()
26778        }
26779    }
26780}
26781#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
26782#[doc = "Control vehicle tone generation (buzzer)."]
26783#[doc = ""]
26784#[doc = "ID: 258"]
26785#[derive(Debug, Clone, PartialEq)]
26786#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26787#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26788#[cfg_attr(feature = "ts", derive(TS))]
26789#[cfg_attr(feature = "ts", ts(export))]
26790pub struct PLAY_TUNE_DATA {
26791    #[doc = "System ID"]
26792    pub target_system: u8,
26793    #[doc = "Component ID"]
26794    pub target_component: u8,
26795    #[doc = "tune in board specific format"]
26796    #[cfg_attr(feature = "ts", ts(type = "string"))]
26797    pub tune: CharArray<30>,
26798    #[doc = "tune extension (appended to tune)"]
26799    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26800    #[cfg_attr(feature = "ts", ts(type = "string"))]
26801    pub tune2: CharArray<200>,
26802}
26803impl PLAY_TUNE_DATA {
26804    pub const ENCODED_LEN: usize = 232usize;
26805    pub const DEFAULT: Self = Self {
26806        target_system: 0_u8,
26807        target_component: 0_u8,
26808        tune: CharArray::new([0_u8; 30usize]),
26809        tune2: CharArray::new([0_u8; 200usize]),
26810    };
26811    #[cfg(feature = "arbitrary")]
26812    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26813        use arbitrary::{Arbitrary, Unstructured};
26814        let mut buf = [0u8; 1024];
26815        rng.fill_bytes(&mut buf);
26816        let mut unstructured = Unstructured::new(&buf);
26817        Self::arbitrary(&mut unstructured).unwrap_or_default()
26818    }
26819}
26820impl Default for PLAY_TUNE_DATA {
26821    fn default() -> Self {
26822        Self::DEFAULT.clone()
26823    }
26824}
26825impl MessageData for PLAY_TUNE_DATA {
26826    type Message = MavMessage;
26827    const ID: u32 = 258u32;
26828    const NAME: &'static str = "PLAY_TUNE";
26829    const EXTRA_CRC: u8 = 187u8;
26830    const ENCODED_LEN: usize = 232usize;
26831    fn deser(
26832        _version: MavlinkVersion,
26833        __input: &[u8],
26834    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26835        let avail_len = __input.len();
26836        let mut payload_buf = [0; Self::ENCODED_LEN];
26837        let mut buf = if avail_len < Self::ENCODED_LEN {
26838            payload_buf[0..avail_len].copy_from_slice(__input);
26839            Bytes::new(&payload_buf)
26840        } else {
26841            Bytes::new(__input)
26842        };
26843        let mut __struct = Self::default();
26844        __struct.target_system = buf.get_u8()?;
26845        __struct.target_component = buf.get_u8()?;
26846        let mut tmp = [0_u8; 30usize];
26847        for v in &mut tmp {
26848            *v = buf.get_u8()?;
26849        }
26850        __struct.tune = CharArray::new(tmp);
26851        let mut tmp = [0_u8; 200usize];
26852        for v in &mut tmp {
26853            *v = buf.get_u8()?;
26854        }
26855        __struct.tune2 = CharArray::new(tmp);
26856        Ok(__struct)
26857    }
26858    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26859        let mut __tmp = BytesMut::new(bytes);
26860        #[allow(clippy::absurd_extreme_comparisons)]
26861        #[allow(unused_comparisons)]
26862        if __tmp.remaining() < Self::ENCODED_LEN {
26863            panic!(
26864                "buffer is too small (need {} bytes, but got {})",
26865                Self::ENCODED_LEN,
26866                __tmp.remaining(),
26867            )
26868        }
26869        __tmp.put_u8(self.target_system);
26870        __tmp.put_u8(self.target_component);
26871        for val in &self.tune {
26872            __tmp.put_u8(*val);
26873        }
26874        if matches!(version, MavlinkVersion::V2) {
26875            for val in &self.tune2 {
26876                __tmp.put_u8(*val);
26877            }
26878            let len = __tmp.len();
26879            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26880        } else {
26881            __tmp.len()
26882        }
26883    }
26884}
26885#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
26886#[doc = ""]
26887#[doc = "ID: 400"]
26888#[derive(Debug, Clone, PartialEq)]
26889#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26890#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26891#[cfg_attr(feature = "ts", derive(TS))]
26892#[cfg_attr(feature = "ts", ts(export))]
26893pub struct PLAY_TUNE_V2_DATA {
26894    #[doc = "Tune format"]
26895    pub format: TuneFormat,
26896    #[doc = "System ID"]
26897    pub target_system: u8,
26898    #[doc = "Component ID"]
26899    pub target_component: u8,
26900    #[doc = "Tune definition as a NULL-terminated string."]
26901    #[cfg_attr(feature = "ts", ts(type = "string"))]
26902    pub tune: CharArray<248>,
26903}
26904impl PLAY_TUNE_V2_DATA {
26905    pub const ENCODED_LEN: usize = 254usize;
26906    pub const DEFAULT: Self = Self {
26907        format: TuneFormat::DEFAULT,
26908        target_system: 0_u8,
26909        target_component: 0_u8,
26910        tune: CharArray::new([0_u8; 248usize]),
26911    };
26912    #[cfg(feature = "arbitrary")]
26913    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26914        use arbitrary::{Arbitrary, Unstructured};
26915        let mut buf = [0u8; 1024];
26916        rng.fill_bytes(&mut buf);
26917        let mut unstructured = Unstructured::new(&buf);
26918        Self::arbitrary(&mut unstructured).unwrap_or_default()
26919    }
26920}
26921impl Default for PLAY_TUNE_V2_DATA {
26922    fn default() -> Self {
26923        Self::DEFAULT.clone()
26924    }
26925}
26926impl MessageData for PLAY_TUNE_V2_DATA {
26927    type Message = MavMessage;
26928    const ID: u32 = 400u32;
26929    const NAME: &'static str = "PLAY_TUNE_V2";
26930    const EXTRA_CRC: u8 = 110u8;
26931    const ENCODED_LEN: usize = 254usize;
26932    fn deser(
26933        _version: MavlinkVersion,
26934        __input: &[u8],
26935    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26936        let avail_len = __input.len();
26937        let mut payload_buf = [0; Self::ENCODED_LEN];
26938        let mut buf = if avail_len < Self::ENCODED_LEN {
26939            payload_buf[0..avail_len].copy_from_slice(__input);
26940            Bytes::new(&payload_buf)
26941        } else {
26942            Bytes::new(__input)
26943        };
26944        let mut __struct = Self::default();
26945        let tmp = buf.get_u32_le()?;
26946        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
26947            ::mavlink_core::error::ParserError::InvalidEnum {
26948                enum_type: "TuneFormat",
26949                value: tmp as u64,
26950            },
26951        )?;
26952        __struct.target_system = buf.get_u8()?;
26953        __struct.target_component = buf.get_u8()?;
26954        let mut tmp = [0_u8; 248usize];
26955        for v in &mut tmp {
26956            *v = buf.get_u8()?;
26957        }
26958        __struct.tune = CharArray::new(tmp);
26959        Ok(__struct)
26960    }
26961    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26962        let mut __tmp = BytesMut::new(bytes);
26963        #[allow(clippy::absurd_extreme_comparisons)]
26964        #[allow(unused_comparisons)]
26965        if __tmp.remaining() < Self::ENCODED_LEN {
26966            panic!(
26967                "buffer is too small (need {} bytes, but got {})",
26968                Self::ENCODED_LEN,
26969                __tmp.remaining(),
26970            )
26971        }
26972        __tmp.put_u32_le(self.format as u32);
26973        __tmp.put_u8(self.target_system);
26974        __tmp.put_u8(self.target_component);
26975        for val in &self.tune {
26976            __tmp.put_u8(*val);
26977        }
26978        if matches!(version, MavlinkVersion::V2) {
26979            let len = __tmp.len();
26980            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26981        } else {
26982            __tmp.len()
26983        }
26984    }
26985}
26986#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
26987#[doc = ""]
26988#[doc = "ID: 87"]
26989#[derive(Debug, Clone, PartialEq)]
26990#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26991#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26992#[cfg_attr(feature = "ts", derive(TS))]
26993#[cfg_attr(feature = "ts", ts(export))]
26994pub struct POSITION_TARGET_GLOBAL_INT_DATA {
26995    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
26996    pub time_boot_ms: u32,
26997    #[doc = "Latitude in WGS84 frame"]
26998    pub lat_int: i32,
26999    #[doc = "Longitude in WGS84 frame"]
27000    pub lon_int: i32,
27001    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
27002    pub alt: f32,
27003    #[doc = "X velocity in NED frame"]
27004    pub vx: f32,
27005    #[doc = "Y velocity in NED frame"]
27006    pub vy: f32,
27007    #[doc = "Z velocity in NED frame"]
27008    pub vz: f32,
27009    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27010    pub afx: f32,
27011    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27012    pub afy: f32,
27013    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27014    pub afz: f32,
27015    #[doc = "yaw setpoint"]
27016    pub yaw: f32,
27017    #[doc = "yaw rate setpoint"]
27018    pub yaw_rate: f32,
27019    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
27020    pub type_mask: PositionTargetTypemask,
27021    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
27022    pub coordinate_frame: MavFrame,
27023}
27024impl POSITION_TARGET_GLOBAL_INT_DATA {
27025    pub const ENCODED_LEN: usize = 51usize;
27026    pub const DEFAULT: Self = Self {
27027        time_boot_ms: 0_u32,
27028        lat_int: 0_i32,
27029        lon_int: 0_i32,
27030        alt: 0.0_f32,
27031        vx: 0.0_f32,
27032        vy: 0.0_f32,
27033        vz: 0.0_f32,
27034        afx: 0.0_f32,
27035        afy: 0.0_f32,
27036        afz: 0.0_f32,
27037        yaw: 0.0_f32,
27038        yaw_rate: 0.0_f32,
27039        type_mask: PositionTargetTypemask::DEFAULT,
27040        coordinate_frame: MavFrame::DEFAULT,
27041    };
27042    #[cfg(feature = "arbitrary")]
27043    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27044        use arbitrary::{Arbitrary, Unstructured};
27045        let mut buf = [0u8; 1024];
27046        rng.fill_bytes(&mut buf);
27047        let mut unstructured = Unstructured::new(&buf);
27048        Self::arbitrary(&mut unstructured).unwrap_or_default()
27049    }
27050}
27051impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
27052    fn default() -> Self {
27053        Self::DEFAULT.clone()
27054    }
27055}
27056impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
27057    type Message = MavMessage;
27058    const ID: u32 = 87u32;
27059    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
27060    const EXTRA_CRC: u8 = 150u8;
27061    const ENCODED_LEN: usize = 51usize;
27062    fn deser(
27063        _version: MavlinkVersion,
27064        __input: &[u8],
27065    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27066        let avail_len = __input.len();
27067        let mut payload_buf = [0; Self::ENCODED_LEN];
27068        let mut buf = if avail_len < Self::ENCODED_LEN {
27069            payload_buf[0..avail_len].copy_from_slice(__input);
27070            Bytes::new(&payload_buf)
27071        } else {
27072            Bytes::new(__input)
27073        };
27074        let mut __struct = Self::default();
27075        __struct.time_boot_ms = buf.get_u32_le()?;
27076        __struct.lat_int = buf.get_i32_le()?;
27077        __struct.lon_int = buf.get_i32_le()?;
27078        __struct.alt = buf.get_f32_le()?;
27079        __struct.vx = buf.get_f32_le()?;
27080        __struct.vy = buf.get_f32_le()?;
27081        __struct.vz = buf.get_f32_le()?;
27082        __struct.afx = buf.get_f32_le()?;
27083        __struct.afy = buf.get_f32_le()?;
27084        __struct.afz = buf.get_f32_le()?;
27085        __struct.yaw = buf.get_f32_le()?;
27086        __struct.yaw_rate = buf.get_f32_le()?;
27087        let tmp = buf.get_u16_le()?;
27088        __struct.type_mask =
27089            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
27090                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27091                    flag_type: "PositionTargetTypemask",
27092                    value: tmp as u64,
27093                })?;
27094        let tmp = buf.get_u8()?;
27095        __struct.coordinate_frame =
27096            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27097                enum_type: "MavFrame",
27098                value: tmp as u64,
27099            })?;
27100        Ok(__struct)
27101    }
27102    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27103        let mut __tmp = BytesMut::new(bytes);
27104        #[allow(clippy::absurd_extreme_comparisons)]
27105        #[allow(unused_comparisons)]
27106        if __tmp.remaining() < Self::ENCODED_LEN {
27107            panic!(
27108                "buffer is too small (need {} bytes, but got {})",
27109                Self::ENCODED_LEN,
27110                __tmp.remaining(),
27111            )
27112        }
27113        __tmp.put_u32_le(self.time_boot_ms);
27114        __tmp.put_i32_le(self.lat_int);
27115        __tmp.put_i32_le(self.lon_int);
27116        __tmp.put_f32_le(self.alt);
27117        __tmp.put_f32_le(self.vx);
27118        __tmp.put_f32_le(self.vy);
27119        __tmp.put_f32_le(self.vz);
27120        __tmp.put_f32_le(self.afx);
27121        __tmp.put_f32_le(self.afy);
27122        __tmp.put_f32_le(self.afz);
27123        __tmp.put_f32_le(self.yaw);
27124        __tmp.put_f32_le(self.yaw_rate);
27125        __tmp.put_u16_le(self.type_mask.bits() as u16);
27126        __tmp.put_u8(self.coordinate_frame as u8);
27127        if matches!(version, MavlinkVersion::V2) {
27128            let len = __tmp.len();
27129            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27130        } else {
27131            __tmp.len()
27132        }
27133    }
27134}
27135#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
27136#[doc = ""]
27137#[doc = "ID: 85"]
27138#[derive(Debug, Clone, PartialEq)]
27139#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27140#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27141#[cfg_attr(feature = "ts", derive(TS))]
27142#[cfg_attr(feature = "ts", ts(export))]
27143pub struct POSITION_TARGET_LOCAL_NED_DATA {
27144    #[doc = "Timestamp (time since system boot)."]
27145    pub time_boot_ms: u32,
27146    #[doc = "X Position in NED frame"]
27147    pub x: f32,
27148    #[doc = "Y Position in NED frame"]
27149    pub y: f32,
27150    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
27151    pub z: f32,
27152    #[doc = "X velocity in NED frame"]
27153    pub vx: f32,
27154    #[doc = "Y velocity in NED frame"]
27155    pub vy: f32,
27156    #[doc = "Z velocity in NED frame"]
27157    pub vz: f32,
27158    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27159    pub afx: f32,
27160    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27161    pub afy: f32,
27162    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27163    pub afz: f32,
27164    #[doc = "yaw setpoint"]
27165    pub yaw: f32,
27166    #[doc = "yaw rate setpoint"]
27167    pub yaw_rate: f32,
27168    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
27169    pub type_mask: PositionTargetTypemask,
27170    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
27171    pub coordinate_frame: MavFrame,
27172}
27173impl POSITION_TARGET_LOCAL_NED_DATA {
27174    pub const ENCODED_LEN: usize = 51usize;
27175    pub const DEFAULT: Self = Self {
27176        time_boot_ms: 0_u32,
27177        x: 0.0_f32,
27178        y: 0.0_f32,
27179        z: 0.0_f32,
27180        vx: 0.0_f32,
27181        vy: 0.0_f32,
27182        vz: 0.0_f32,
27183        afx: 0.0_f32,
27184        afy: 0.0_f32,
27185        afz: 0.0_f32,
27186        yaw: 0.0_f32,
27187        yaw_rate: 0.0_f32,
27188        type_mask: PositionTargetTypemask::DEFAULT,
27189        coordinate_frame: MavFrame::DEFAULT,
27190    };
27191    #[cfg(feature = "arbitrary")]
27192    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27193        use arbitrary::{Arbitrary, Unstructured};
27194        let mut buf = [0u8; 1024];
27195        rng.fill_bytes(&mut buf);
27196        let mut unstructured = Unstructured::new(&buf);
27197        Self::arbitrary(&mut unstructured).unwrap_or_default()
27198    }
27199}
27200impl Default for POSITION_TARGET_LOCAL_NED_DATA {
27201    fn default() -> Self {
27202        Self::DEFAULT.clone()
27203    }
27204}
27205impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
27206    type Message = MavMessage;
27207    const ID: u32 = 85u32;
27208    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
27209    const EXTRA_CRC: u8 = 140u8;
27210    const ENCODED_LEN: usize = 51usize;
27211    fn deser(
27212        _version: MavlinkVersion,
27213        __input: &[u8],
27214    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27215        let avail_len = __input.len();
27216        let mut payload_buf = [0; Self::ENCODED_LEN];
27217        let mut buf = if avail_len < Self::ENCODED_LEN {
27218            payload_buf[0..avail_len].copy_from_slice(__input);
27219            Bytes::new(&payload_buf)
27220        } else {
27221            Bytes::new(__input)
27222        };
27223        let mut __struct = Self::default();
27224        __struct.time_boot_ms = buf.get_u32_le()?;
27225        __struct.x = buf.get_f32_le()?;
27226        __struct.y = buf.get_f32_le()?;
27227        __struct.z = buf.get_f32_le()?;
27228        __struct.vx = buf.get_f32_le()?;
27229        __struct.vy = buf.get_f32_le()?;
27230        __struct.vz = buf.get_f32_le()?;
27231        __struct.afx = buf.get_f32_le()?;
27232        __struct.afy = buf.get_f32_le()?;
27233        __struct.afz = buf.get_f32_le()?;
27234        __struct.yaw = buf.get_f32_le()?;
27235        __struct.yaw_rate = buf.get_f32_le()?;
27236        let tmp = buf.get_u16_le()?;
27237        __struct.type_mask =
27238            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
27239                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27240                    flag_type: "PositionTargetTypemask",
27241                    value: tmp as u64,
27242                })?;
27243        let tmp = buf.get_u8()?;
27244        __struct.coordinate_frame =
27245            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27246                enum_type: "MavFrame",
27247                value: tmp as u64,
27248            })?;
27249        Ok(__struct)
27250    }
27251    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27252        let mut __tmp = BytesMut::new(bytes);
27253        #[allow(clippy::absurd_extreme_comparisons)]
27254        #[allow(unused_comparisons)]
27255        if __tmp.remaining() < Self::ENCODED_LEN {
27256            panic!(
27257                "buffer is too small (need {} bytes, but got {})",
27258                Self::ENCODED_LEN,
27259                __tmp.remaining(),
27260            )
27261        }
27262        __tmp.put_u32_le(self.time_boot_ms);
27263        __tmp.put_f32_le(self.x);
27264        __tmp.put_f32_le(self.y);
27265        __tmp.put_f32_le(self.z);
27266        __tmp.put_f32_le(self.vx);
27267        __tmp.put_f32_le(self.vy);
27268        __tmp.put_f32_le(self.vz);
27269        __tmp.put_f32_le(self.afx);
27270        __tmp.put_f32_le(self.afy);
27271        __tmp.put_f32_le(self.afz);
27272        __tmp.put_f32_le(self.yaw);
27273        __tmp.put_f32_le(self.yaw_rate);
27274        __tmp.put_u16_le(self.type_mask.bits() as u16);
27275        __tmp.put_u8(self.coordinate_frame as u8);
27276        if matches!(version, MavlinkVersion::V2) {
27277            let len = __tmp.len();
27278            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27279        } else {
27280            __tmp.len()
27281        }
27282    }
27283}
27284#[doc = "Power supply status."]
27285#[doc = ""]
27286#[doc = "ID: 125"]
27287#[derive(Debug, Clone, PartialEq)]
27288#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27289#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27290#[cfg_attr(feature = "ts", derive(TS))]
27291#[cfg_attr(feature = "ts", ts(export))]
27292pub struct POWER_STATUS_DATA {
27293    #[doc = "5V rail voltage."]
27294    pub Vcc: u16,
27295    #[doc = "Servo rail voltage."]
27296    pub Vservo: u16,
27297    #[doc = "Bitmap of power supply status flags."]
27298    pub flags: MavPowerStatus,
27299}
27300impl POWER_STATUS_DATA {
27301    pub const ENCODED_LEN: usize = 6usize;
27302    pub const DEFAULT: Self = Self {
27303        Vcc: 0_u16,
27304        Vservo: 0_u16,
27305        flags: MavPowerStatus::DEFAULT,
27306    };
27307    #[cfg(feature = "arbitrary")]
27308    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27309        use arbitrary::{Arbitrary, Unstructured};
27310        let mut buf = [0u8; 1024];
27311        rng.fill_bytes(&mut buf);
27312        let mut unstructured = Unstructured::new(&buf);
27313        Self::arbitrary(&mut unstructured).unwrap_or_default()
27314    }
27315}
27316impl Default for POWER_STATUS_DATA {
27317    fn default() -> Self {
27318        Self::DEFAULT.clone()
27319    }
27320}
27321impl MessageData for POWER_STATUS_DATA {
27322    type Message = MavMessage;
27323    const ID: u32 = 125u32;
27324    const NAME: &'static str = "POWER_STATUS";
27325    const EXTRA_CRC: u8 = 203u8;
27326    const ENCODED_LEN: usize = 6usize;
27327    fn deser(
27328        _version: MavlinkVersion,
27329        __input: &[u8],
27330    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27331        let avail_len = __input.len();
27332        let mut payload_buf = [0; Self::ENCODED_LEN];
27333        let mut buf = if avail_len < Self::ENCODED_LEN {
27334            payload_buf[0..avail_len].copy_from_slice(__input);
27335            Bytes::new(&payload_buf)
27336        } else {
27337            Bytes::new(__input)
27338        };
27339        let mut __struct = Self::default();
27340        __struct.Vcc = buf.get_u16_le()?;
27341        __struct.Vservo = buf.get_u16_le()?;
27342        let tmp = buf.get_u16_le()?;
27343        __struct.flags = MavPowerStatus::from_bits(tmp as <MavPowerStatus as Flags>::Bits).ok_or(
27344            ::mavlink_core::error::ParserError::InvalidFlag {
27345                flag_type: "MavPowerStatus",
27346                value: tmp as u64,
27347            },
27348        )?;
27349        Ok(__struct)
27350    }
27351    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27352        let mut __tmp = BytesMut::new(bytes);
27353        #[allow(clippy::absurd_extreme_comparisons)]
27354        #[allow(unused_comparisons)]
27355        if __tmp.remaining() < Self::ENCODED_LEN {
27356            panic!(
27357                "buffer is too small (need {} bytes, but got {})",
27358                Self::ENCODED_LEN,
27359                __tmp.remaining(),
27360            )
27361        }
27362        __tmp.put_u16_le(self.Vcc);
27363        __tmp.put_u16_le(self.Vservo);
27364        __tmp.put_u16_le(self.flags.bits() as u16);
27365        if matches!(version, MavlinkVersion::V2) {
27366            let len = __tmp.len();
27367            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27368        } else {
27369            __tmp.len()
27370        }
27371    }
27372}
27373#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
27374#[doc = ""]
27375#[doc = "ID: 300"]
27376#[derive(Debug, Clone, PartialEq)]
27377#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27378#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27379#[cfg_attr(feature = "ts", derive(TS))]
27380#[cfg_attr(feature = "ts", ts(export))]
27381pub struct PROTOCOL_VERSION_DATA {
27382    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
27383    pub version: u16,
27384    #[doc = "Minimum MAVLink version supported"]
27385    pub min_version: u16,
27386    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
27387    pub max_version: u16,
27388    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
27389    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27390    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27391    pub spec_version_hash: [u8; 8],
27392    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
27393    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27394    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27395    pub library_version_hash: [u8; 8],
27396}
27397impl PROTOCOL_VERSION_DATA {
27398    pub const ENCODED_LEN: usize = 22usize;
27399    pub const DEFAULT: Self = Self {
27400        version: 0_u16,
27401        min_version: 0_u16,
27402        max_version: 0_u16,
27403        spec_version_hash: [0_u8; 8usize],
27404        library_version_hash: [0_u8; 8usize],
27405    };
27406    #[cfg(feature = "arbitrary")]
27407    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27408        use arbitrary::{Arbitrary, Unstructured};
27409        let mut buf = [0u8; 1024];
27410        rng.fill_bytes(&mut buf);
27411        let mut unstructured = Unstructured::new(&buf);
27412        Self::arbitrary(&mut unstructured).unwrap_or_default()
27413    }
27414}
27415impl Default for PROTOCOL_VERSION_DATA {
27416    fn default() -> Self {
27417        Self::DEFAULT.clone()
27418    }
27419}
27420impl MessageData for PROTOCOL_VERSION_DATA {
27421    type Message = MavMessage;
27422    const ID: u32 = 300u32;
27423    const NAME: &'static str = "PROTOCOL_VERSION";
27424    const EXTRA_CRC: u8 = 217u8;
27425    const ENCODED_LEN: usize = 22usize;
27426    fn deser(
27427        _version: MavlinkVersion,
27428        __input: &[u8],
27429    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27430        let avail_len = __input.len();
27431        let mut payload_buf = [0; Self::ENCODED_LEN];
27432        let mut buf = if avail_len < Self::ENCODED_LEN {
27433            payload_buf[0..avail_len].copy_from_slice(__input);
27434            Bytes::new(&payload_buf)
27435        } else {
27436            Bytes::new(__input)
27437        };
27438        let mut __struct = Self::default();
27439        __struct.version = buf.get_u16_le()?;
27440        __struct.min_version = buf.get_u16_le()?;
27441        __struct.max_version = buf.get_u16_le()?;
27442        for v in &mut __struct.spec_version_hash {
27443            let val = buf.get_u8()?;
27444            *v = val;
27445        }
27446        for v in &mut __struct.library_version_hash {
27447            let val = buf.get_u8()?;
27448            *v = val;
27449        }
27450        Ok(__struct)
27451    }
27452    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27453        let mut __tmp = BytesMut::new(bytes);
27454        #[allow(clippy::absurd_extreme_comparisons)]
27455        #[allow(unused_comparisons)]
27456        if __tmp.remaining() < Self::ENCODED_LEN {
27457            panic!(
27458                "buffer is too small (need {} bytes, but got {})",
27459                Self::ENCODED_LEN,
27460                __tmp.remaining(),
27461            )
27462        }
27463        __tmp.put_u16_le(self.version);
27464        __tmp.put_u16_le(self.min_version);
27465        __tmp.put_u16_le(self.max_version);
27466        for val in &self.spec_version_hash {
27467            __tmp.put_u8(*val);
27468        }
27469        for val in &self.library_version_hash {
27470            __tmp.put_u8(*val);
27471        }
27472        if matches!(version, MavlinkVersion::V2) {
27473            let len = __tmp.len();
27474            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27475        } else {
27476            __tmp.len()
27477        }
27478    }
27479}
27480#[doc = "Status generated by radio and injected into MAVLink stream."]
27481#[doc = ""]
27482#[doc = "ID: 109"]
27483#[derive(Debug, Clone, PartialEq)]
27484#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27485#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27486#[cfg_attr(feature = "ts", derive(TS))]
27487#[cfg_attr(feature = "ts", ts(export))]
27488pub struct RADIO_STATUS_DATA {
27489    #[doc = "Count of radio packet receive errors (since boot)."]
27490    pub rxerrors: u16,
27491    #[doc = "Count of error corrected radio packets (since boot)."]
27492    pub fixed: u16,
27493    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
27494    pub rssi: u8,
27495    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
27496    pub remrssi: u8,
27497    #[doc = "Remaining free transmitter buffer space."]
27498    pub txbuf: u8,
27499    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
27500    pub noise: u8,
27501    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
27502    pub remnoise: u8,
27503}
27504impl RADIO_STATUS_DATA {
27505    pub const ENCODED_LEN: usize = 9usize;
27506    pub const DEFAULT: Self = Self {
27507        rxerrors: 0_u16,
27508        fixed: 0_u16,
27509        rssi: 0_u8,
27510        remrssi: 0_u8,
27511        txbuf: 0_u8,
27512        noise: 0_u8,
27513        remnoise: 0_u8,
27514    };
27515    #[cfg(feature = "arbitrary")]
27516    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27517        use arbitrary::{Arbitrary, Unstructured};
27518        let mut buf = [0u8; 1024];
27519        rng.fill_bytes(&mut buf);
27520        let mut unstructured = Unstructured::new(&buf);
27521        Self::arbitrary(&mut unstructured).unwrap_or_default()
27522    }
27523}
27524impl Default for RADIO_STATUS_DATA {
27525    fn default() -> Self {
27526        Self::DEFAULT.clone()
27527    }
27528}
27529impl MessageData for RADIO_STATUS_DATA {
27530    type Message = MavMessage;
27531    const ID: u32 = 109u32;
27532    const NAME: &'static str = "RADIO_STATUS";
27533    const EXTRA_CRC: u8 = 185u8;
27534    const ENCODED_LEN: usize = 9usize;
27535    fn deser(
27536        _version: MavlinkVersion,
27537        __input: &[u8],
27538    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27539        let avail_len = __input.len();
27540        let mut payload_buf = [0; Self::ENCODED_LEN];
27541        let mut buf = if avail_len < Self::ENCODED_LEN {
27542            payload_buf[0..avail_len].copy_from_slice(__input);
27543            Bytes::new(&payload_buf)
27544        } else {
27545            Bytes::new(__input)
27546        };
27547        let mut __struct = Self::default();
27548        __struct.rxerrors = buf.get_u16_le()?;
27549        __struct.fixed = buf.get_u16_le()?;
27550        __struct.rssi = buf.get_u8()?;
27551        __struct.remrssi = buf.get_u8()?;
27552        __struct.txbuf = buf.get_u8()?;
27553        __struct.noise = buf.get_u8()?;
27554        __struct.remnoise = buf.get_u8()?;
27555        Ok(__struct)
27556    }
27557    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27558        let mut __tmp = BytesMut::new(bytes);
27559        #[allow(clippy::absurd_extreme_comparisons)]
27560        #[allow(unused_comparisons)]
27561        if __tmp.remaining() < Self::ENCODED_LEN {
27562            panic!(
27563                "buffer is too small (need {} bytes, but got {})",
27564                Self::ENCODED_LEN,
27565                __tmp.remaining(),
27566            )
27567        }
27568        __tmp.put_u16_le(self.rxerrors);
27569        __tmp.put_u16_le(self.fixed);
27570        __tmp.put_u8(self.rssi);
27571        __tmp.put_u8(self.remrssi);
27572        __tmp.put_u8(self.txbuf);
27573        __tmp.put_u8(self.noise);
27574        __tmp.put_u8(self.remnoise);
27575        if matches!(version, MavlinkVersion::V2) {
27576            let len = __tmp.len();
27577            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27578        } else {
27579            __tmp.len()
27580        }
27581    }
27582}
27583#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
27584#[doc = ""]
27585#[doc = "ID: 27"]
27586#[derive(Debug, Clone, PartialEq)]
27587#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27588#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27589#[cfg_attr(feature = "ts", derive(TS))]
27590#[cfg_attr(feature = "ts", ts(export))]
27591pub struct RAW_IMU_DATA {
27592    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27593    pub time_usec: u64,
27594    #[doc = "X acceleration (raw)"]
27595    pub xacc: i16,
27596    #[doc = "Y acceleration (raw)"]
27597    pub yacc: i16,
27598    #[doc = "Z acceleration (raw)"]
27599    pub zacc: i16,
27600    #[doc = "Angular speed around X axis (raw)"]
27601    pub xgyro: i16,
27602    #[doc = "Angular speed around Y axis (raw)"]
27603    pub ygyro: i16,
27604    #[doc = "Angular speed around Z axis (raw)"]
27605    pub zgyro: i16,
27606    #[doc = "X Magnetic field (raw)"]
27607    pub xmag: i16,
27608    #[doc = "Y Magnetic field (raw)"]
27609    pub ymag: i16,
27610    #[doc = "Z Magnetic field (raw)"]
27611    pub zmag: i16,
27612    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
27613    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27614    pub id: u8,
27615    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27616    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27617    pub temperature: i16,
27618}
27619impl RAW_IMU_DATA {
27620    pub const ENCODED_LEN: usize = 29usize;
27621    pub const DEFAULT: Self = Self {
27622        time_usec: 0_u64,
27623        xacc: 0_i16,
27624        yacc: 0_i16,
27625        zacc: 0_i16,
27626        xgyro: 0_i16,
27627        ygyro: 0_i16,
27628        zgyro: 0_i16,
27629        xmag: 0_i16,
27630        ymag: 0_i16,
27631        zmag: 0_i16,
27632        id: 0_u8,
27633        temperature: 0_i16,
27634    };
27635    #[cfg(feature = "arbitrary")]
27636    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27637        use arbitrary::{Arbitrary, Unstructured};
27638        let mut buf = [0u8; 1024];
27639        rng.fill_bytes(&mut buf);
27640        let mut unstructured = Unstructured::new(&buf);
27641        Self::arbitrary(&mut unstructured).unwrap_or_default()
27642    }
27643}
27644impl Default for RAW_IMU_DATA {
27645    fn default() -> Self {
27646        Self::DEFAULT.clone()
27647    }
27648}
27649impl MessageData for RAW_IMU_DATA {
27650    type Message = MavMessage;
27651    const ID: u32 = 27u32;
27652    const NAME: &'static str = "RAW_IMU";
27653    const EXTRA_CRC: u8 = 144u8;
27654    const ENCODED_LEN: usize = 29usize;
27655    fn deser(
27656        _version: MavlinkVersion,
27657        __input: &[u8],
27658    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27659        let avail_len = __input.len();
27660        let mut payload_buf = [0; Self::ENCODED_LEN];
27661        let mut buf = if avail_len < Self::ENCODED_LEN {
27662            payload_buf[0..avail_len].copy_from_slice(__input);
27663            Bytes::new(&payload_buf)
27664        } else {
27665            Bytes::new(__input)
27666        };
27667        let mut __struct = Self::default();
27668        __struct.time_usec = buf.get_u64_le()?;
27669        __struct.xacc = buf.get_i16_le()?;
27670        __struct.yacc = buf.get_i16_le()?;
27671        __struct.zacc = buf.get_i16_le()?;
27672        __struct.xgyro = buf.get_i16_le()?;
27673        __struct.ygyro = buf.get_i16_le()?;
27674        __struct.zgyro = buf.get_i16_le()?;
27675        __struct.xmag = buf.get_i16_le()?;
27676        __struct.ymag = buf.get_i16_le()?;
27677        __struct.zmag = buf.get_i16_le()?;
27678        __struct.id = buf.get_u8()?;
27679        __struct.temperature = buf.get_i16_le()?;
27680        Ok(__struct)
27681    }
27682    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27683        let mut __tmp = BytesMut::new(bytes);
27684        #[allow(clippy::absurd_extreme_comparisons)]
27685        #[allow(unused_comparisons)]
27686        if __tmp.remaining() < Self::ENCODED_LEN {
27687            panic!(
27688                "buffer is too small (need {} bytes, but got {})",
27689                Self::ENCODED_LEN,
27690                __tmp.remaining(),
27691            )
27692        }
27693        __tmp.put_u64_le(self.time_usec);
27694        __tmp.put_i16_le(self.xacc);
27695        __tmp.put_i16_le(self.yacc);
27696        __tmp.put_i16_le(self.zacc);
27697        __tmp.put_i16_le(self.xgyro);
27698        __tmp.put_i16_le(self.ygyro);
27699        __tmp.put_i16_le(self.zgyro);
27700        __tmp.put_i16_le(self.xmag);
27701        __tmp.put_i16_le(self.ymag);
27702        __tmp.put_i16_le(self.zmag);
27703        if matches!(version, MavlinkVersion::V2) {
27704            __tmp.put_u8(self.id);
27705            __tmp.put_i16_le(self.temperature);
27706            let len = __tmp.len();
27707            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27708        } else {
27709            __tmp.len()
27710        }
27711    }
27712}
27713#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
27714#[doc = ""]
27715#[doc = "ID: 28"]
27716#[derive(Debug, Clone, PartialEq)]
27717#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27718#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27719#[cfg_attr(feature = "ts", derive(TS))]
27720#[cfg_attr(feature = "ts", ts(export))]
27721pub struct RAW_PRESSURE_DATA {
27722    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27723    pub time_usec: u64,
27724    #[doc = "Absolute pressure (raw)"]
27725    pub press_abs: i16,
27726    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
27727    pub press_diff1: i16,
27728    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
27729    pub press_diff2: i16,
27730    #[doc = "Raw Temperature measurement (raw)"]
27731    pub temperature: i16,
27732}
27733impl RAW_PRESSURE_DATA {
27734    pub const ENCODED_LEN: usize = 16usize;
27735    pub const DEFAULT: Self = Self {
27736        time_usec: 0_u64,
27737        press_abs: 0_i16,
27738        press_diff1: 0_i16,
27739        press_diff2: 0_i16,
27740        temperature: 0_i16,
27741    };
27742    #[cfg(feature = "arbitrary")]
27743    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27744        use arbitrary::{Arbitrary, Unstructured};
27745        let mut buf = [0u8; 1024];
27746        rng.fill_bytes(&mut buf);
27747        let mut unstructured = Unstructured::new(&buf);
27748        Self::arbitrary(&mut unstructured).unwrap_or_default()
27749    }
27750}
27751impl Default for RAW_PRESSURE_DATA {
27752    fn default() -> Self {
27753        Self::DEFAULT.clone()
27754    }
27755}
27756impl MessageData for RAW_PRESSURE_DATA {
27757    type Message = MavMessage;
27758    const ID: u32 = 28u32;
27759    const NAME: &'static str = "RAW_PRESSURE";
27760    const EXTRA_CRC: u8 = 67u8;
27761    const ENCODED_LEN: usize = 16usize;
27762    fn deser(
27763        _version: MavlinkVersion,
27764        __input: &[u8],
27765    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27766        let avail_len = __input.len();
27767        let mut payload_buf = [0; Self::ENCODED_LEN];
27768        let mut buf = if avail_len < Self::ENCODED_LEN {
27769            payload_buf[0..avail_len].copy_from_slice(__input);
27770            Bytes::new(&payload_buf)
27771        } else {
27772            Bytes::new(__input)
27773        };
27774        let mut __struct = Self::default();
27775        __struct.time_usec = buf.get_u64_le()?;
27776        __struct.press_abs = buf.get_i16_le()?;
27777        __struct.press_diff1 = buf.get_i16_le()?;
27778        __struct.press_diff2 = buf.get_i16_le()?;
27779        __struct.temperature = buf.get_i16_le()?;
27780        Ok(__struct)
27781    }
27782    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27783        let mut __tmp = BytesMut::new(bytes);
27784        #[allow(clippy::absurd_extreme_comparisons)]
27785        #[allow(unused_comparisons)]
27786        if __tmp.remaining() < Self::ENCODED_LEN {
27787            panic!(
27788                "buffer is too small (need {} bytes, but got {})",
27789                Self::ENCODED_LEN,
27790                __tmp.remaining(),
27791            )
27792        }
27793        __tmp.put_u64_le(self.time_usec);
27794        __tmp.put_i16_le(self.press_abs);
27795        __tmp.put_i16_le(self.press_diff1);
27796        __tmp.put_i16_le(self.press_diff2);
27797        __tmp.put_i16_le(self.temperature);
27798        if matches!(version, MavlinkVersion::V2) {
27799            let len = __tmp.len();
27800            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27801        } else {
27802            __tmp.len()
27803        }
27804    }
27805}
27806#[doc = "RPM sensor data message."]
27807#[doc = ""]
27808#[doc = "ID: 339"]
27809#[derive(Debug, Clone, PartialEq)]
27810#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27811#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27812#[cfg_attr(feature = "ts", derive(TS))]
27813#[cfg_attr(feature = "ts", ts(export))]
27814pub struct RAW_RPM_DATA {
27815    #[doc = "Indicated rate"]
27816    pub frequency: f32,
27817    #[doc = "Index of this RPM sensor (0-indexed)"]
27818    pub index: u8,
27819}
27820impl RAW_RPM_DATA {
27821    pub const ENCODED_LEN: usize = 5usize;
27822    pub const DEFAULT: Self = Self {
27823        frequency: 0.0_f32,
27824        index: 0_u8,
27825    };
27826    #[cfg(feature = "arbitrary")]
27827    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27828        use arbitrary::{Arbitrary, Unstructured};
27829        let mut buf = [0u8; 1024];
27830        rng.fill_bytes(&mut buf);
27831        let mut unstructured = Unstructured::new(&buf);
27832        Self::arbitrary(&mut unstructured).unwrap_or_default()
27833    }
27834}
27835impl Default for RAW_RPM_DATA {
27836    fn default() -> Self {
27837        Self::DEFAULT.clone()
27838    }
27839}
27840impl MessageData for RAW_RPM_DATA {
27841    type Message = MavMessage;
27842    const ID: u32 = 339u32;
27843    const NAME: &'static str = "RAW_RPM";
27844    const EXTRA_CRC: u8 = 199u8;
27845    const ENCODED_LEN: usize = 5usize;
27846    fn deser(
27847        _version: MavlinkVersion,
27848        __input: &[u8],
27849    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27850        let avail_len = __input.len();
27851        let mut payload_buf = [0; Self::ENCODED_LEN];
27852        let mut buf = if avail_len < Self::ENCODED_LEN {
27853            payload_buf[0..avail_len].copy_from_slice(__input);
27854            Bytes::new(&payload_buf)
27855        } else {
27856            Bytes::new(__input)
27857        };
27858        let mut __struct = Self::default();
27859        __struct.frequency = buf.get_f32_le()?;
27860        __struct.index = buf.get_u8()?;
27861        Ok(__struct)
27862    }
27863    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27864        let mut __tmp = BytesMut::new(bytes);
27865        #[allow(clippy::absurd_extreme_comparisons)]
27866        #[allow(unused_comparisons)]
27867        if __tmp.remaining() < Self::ENCODED_LEN {
27868            panic!(
27869                "buffer is too small (need {} bytes, but got {})",
27870                Self::ENCODED_LEN,
27871                __tmp.remaining(),
27872            )
27873        }
27874        __tmp.put_f32_le(self.frequency);
27875        __tmp.put_u8(self.index);
27876        if matches!(version, MavlinkVersion::V2) {
27877            let len = __tmp.len();
27878            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27879        } else {
27880            __tmp.len()
27881        }
27882    }
27883}
27884#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
27885#[doc = ""]
27886#[doc = "ID: 65"]
27887#[derive(Debug, Clone, PartialEq)]
27888#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27889#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27890#[cfg_attr(feature = "ts", derive(TS))]
27891#[cfg_attr(feature = "ts", ts(export))]
27892pub struct RC_CHANNELS_DATA {
27893    #[doc = "Timestamp (time since system boot)."]
27894    pub time_boot_ms: u32,
27895    #[doc = "RC channel 1 value."]
27896    pub chan1_raw: u16,
27897    #[doc = "RC channel 2 value."]
27898    pub chan2_raw: u16,
27899    #[doc = "RC channel 3 value."]
27900    pub chan3_raw: u16,
27901    #[doc = "RC channel 4 value."]
27902    pub chan4_raw: u16,
27903    #[doc = "RC channel 5 value."]
27904    pub chan5_raw: u16,
27905    #[doc = "RC channel 6 value."]
27906    pub chan6_raw: u16,
27907    #[doc = "RC channel 7 value."]
27908    pub chan7_raw: u16,
27909    #[doc = "RC channel 8 value."]
27910    pub chan8_raw: u16,
27911    #[doc = "RC channel 9 value."]
27912    pub chan9_raw: u16,
27913    #[doc = "RC channel 10 value."]
27914    pub chan10_raw: u16,
27915    #[doc = "RC channel 11 value."]
27916    pub chan11_raw: u16,
27917    #[doc = "RC channel 12 value."]
27918    pub chan12_raw: u16,
27919    #[doc = "RC channel 13 value."]
27920    pub chan13_raw: u16,
27921    #[doc = "RC channel 14 value."]
27922    pub chan14_raw: u16,
27923    #[doc = "RC channel 15 value."]
27924    pub chan15_raw: u16,
27925    #[doc = "RC channel 16 value."]
27926    pub chan16_raw: u16,
27927    #[doc = "RC channel 17 value."]
27928    pub chan17_raw: u16,
27929    #[doc = "RC channel 18 value."]
27930    pub chan18_raw: u16,
27931    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
27932    pub chancount: u8,
27933    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
27934    pub rssi: u8,
27935}
27936impl RC_CHANNELS_DATA {
27937    pub const ENCODED_LEN: usize = 42usize;
27938    pub const DEFAULT: Self = Self {
27939        time_boot_ms: 0_u32,
27940        chan1_raw: 0_u16,
27941        chan2_raw: 0_u16,
27942        chan3_raw: 0_u16,
27943        chan4_raw: 0_u16,
27944        chan5_raw: 0_u16,
27945        chan6_raw: 0_u16,
27946        chan7_raw: 0_u16,
27947        chan8_raw: 0_u16,
27948        chan9_raw: 0_u16,
27949        chan10_raw: 0_u16,
27950        chan11_raw: 0_u16,
27951        chan12_raw: 0_u16,
27952        chan13_raw: 0_u16,
27953        chan14_raw: 0_u16,
27954        chan15_raw: 0_u16,
27955        chan16_raw: 0_u16,
27956        chan17_raw: 0_u16,
27957        chan18_raw: 0_u16,
27958        chancount: 0_u8,
27959        rssi: 0_u8,
27960    };
27961    #[cfg(feature = "arbitrary")]
27962    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27963        use arbitrary::{Arbitrary, Unstructured};
27964        let mut buf = [0u8; 1024];
27965        rng.fill_bytes(&mut buf);
27966        let mut unstructured = Unstructured::new(&buf);
27967        Self::arbitrary(&mut unstructured).unwrap_or_default()
27968    }
27969}
27970impl Default for RC_CHANNELS_DATA {
27971    fn default() -> Self {
27972        Self::DEFAULT.clone()
27973    }
27974}
27975impl MessageData for RC_CHANNELS_DATA {
27976    type Message = MavMessage;
27977    const ID: u32 = 65u32;
27978    const NAME: &'static str = "RC_CHANNELS";
27979    const EXTRA_CRC: u8 = 118u8;
27980    const ENCODED_LEN: usize = 42usize;
27981    fn deser(
27982        _version: MavlinkVersion,
27983        __input: &[u8],
27984    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27985        let avail_len = __input.len();
27986        let mut payload_buf = [0; Self::ENCODED_LEN];
27987        let mut buf = if avail_len < Self::ENCODED_LEN {
27988            payload_buf[0..avail_len].copy_from_slice(__input);
27989            Bytes::new(&payload_buf)
27990        } else {
27991            Bytes::new(__input)
27992        };
27993        let mut __struct = Self::default();
27994        __struct.time_boot_ms = buf.get_u32_le()?;
27995        __struct.chan1_raw = buf.get_u16_le()?;
27996        __struct.chan2_raw = buf.get_u16_le()?;
27997        __struct.chan3_raw = buf.get_u16_le()?;
27998        __struct.chan4_raw = buf.get_u16_le()?;
27999        __struct.chan5_raw = buf.get_u16_le()?;
28000        __struct.chan6_raw = buf.get_u16_le()?;
28001        __struct.chan7_raw = buf.get_u16_le()?;
28002        __struct.chan8_raw = buf.get_u16_le()?;
28003        __struct.chan9_raw = buf.get_u16_le()?;
28004        __struct.chan10_raw = buf.get_u16_le()?;
28005        __struct.chan11_raw = buf.get_u16_le()?;
28006        __struct.chan12_raw = buf.get_u16_le()?;
28007        __struct.chan13_raw = buf.get_u16_le()?;
28008        __struct.chan14_raw = buf.get_u16_le()?;
28009        __struct.chan15_raw = buf.get_u16_le()?;
28010        __struct.chan16_raw = buf.get_u16_le()?;
28011        __struct.chan17_raw = buf.get_u16_le()?;
28012        __struct.chan18_raw = buf.get_u16_le()?;
28013        __struct.chancount = buf.get_u8()?;
28014        __struct.rssi = buf.get_u8()?;
28015        Ok(__struct)
28016    }
28017    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28018        let mut __tmp = BytesMut::new(bytes);
28019        #[allow(clippy::absurd_extreme_comparisons)]
28020        #[allow(unused_comparisons)]
28021        if __tmp.remaining() < Self::ENCODED_LEN {
28022            panic!(
28023                "buffer is too small (need {} bytes, but got {})",
28024                Self::ENCODED_LEN,
28025                __tmp.remaining(),
28026            )
28027        }
28028        __tmp.put_u32_le(self.time_boot_ms);
28029        __tmp.put_u16_le(self.chan1_raw);
28030        __tmp.put_u16_le(self.chan2_raw);
28031        __tmp.put_u16_le(self.chan3_raw);
28032        __tmp.put_u16_le(self.chan4_raw);
28033        __tmp.put_u16_le(self.chan5_raw);
28034        __tmp.put_u16_le(self.chan6_raw);
28035        __tmp.put_u16_le(self.chan7_raw);
28036        __tmp.put_u16_le(self.chan8_raw);
28037        __tmp.put_u16_le(self.chan9_raw);
28038        __tmp.put_u16_le(self.chan10_raw);
28039        __tmp.put_u16_le(self.chan11_raw);
28040        __tmp.put_u16_le(self.chan12_raw);
28041        __tmp.put_u16_le(self.chan13_raw);
28042        __tmp.put_u16_le(self.chan14_raw);
28043        __tmp.put_u16_le(self.chan15_raw);
28044        __tmp.put_u16_le(self.chan16_raw);
28045        __tmp.put_u16_le(self.chan17_raw);
28046        __tmp.put_u16_le(self.chan18_raw);
28047        __tmp.put_u8(self.chancount);
28048        __tmp.put_u8(self.rssi);
28049        if matches!(version, MavlinkVersion::V2) {
28050            let len = __tmp.len();
28051            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28052        } else {
28053            __tmp.len()
28054        }
28055    }
28056}
28057#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
28058#[doc = ""]
28059#[doc = "ID: 70"]
28060#[derive(Debug, Clone, PartialEq)]
28061#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28062#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28063#[cfg_attr(feature = "ts", derive(TS))]
28064#[cfg_attr(feature = "ts", ts(export))]
28065pub struct RC_CHANNELS_OVERRIDE_DATA {
28066    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
28067    pub chan1_raw: u16,
28068    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
28069    pub chan2_raw: u16,
28070    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
28071    pub chan3_raw: u16,
28072    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
28073    pub chan4_raw: u16,
28074    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
28075    pub chan5_raw: u16,
28076    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
28077    pub chan6_raw: u16,
28078    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
28079    pub chan7_raw: u16,
28080    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
28081    pub chan8_raw: u16,
28082    #[doc = "System ID"]
28083    pub target_system: u8,
28084    #[doc = "Component ID"]
28085    pub target_component: u8,
28086    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
28087    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28088    pub chan9_raw: u16,
28089    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
28090    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28091    pub chan10_raw: u16,
28092    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
28093    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28094    pub chan11_raw: u16,
28095    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
28096    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28097    pub chan12_raw: u16,
28098    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
28099    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28100    pub chan13_raw: u16,
28101    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
28102    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28103    pub chan14_raw: u16,
28104    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
28105    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28106    pub chan15_raw: u16,
28107    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
28108    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28109    pub chan16_raw: u16,
28110    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
28111    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28112    pub chan17_raw: u16,
28113    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
28114    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28115    pub chan18_raw: u16,
28116}
28117impl RC_CHANNELS_OVERRIDE_DATA {
28118    pub const ENCODED_LEN: usize = 38usize;
28119    pub const DEFAULT: Self = Self {
28120        chan1_raw: 0_u16,
28121        chan2_raw: 0_u16,
28122        chan3_raw: 0_u16,
28123        chan4_raw: 0_u16,
28124        chan5_raw: 0_u16,
28125        chan6_raw: 0_u16,
28126        chan7_raw: 0_u16,
28127        chan8_raw: 0_u16,
28128        target_system: 0_u8,
28129        target_component: 0_u8,
28130        chan9_raw: 0_u16,
28131        chan10_raw: 0_u16,
28132        chan11_raw: 0_u16,
28133        chan12_raw: 0_u16,
28134        chan13_raw: 0_u16,
28135        chan14_raw: 0_u16,
28136        chan15_raw: 0_u16,
28137        chan16_raw: 0_u16,
28138        chan17_raw: 0_u16,
28139        chan18_raw: 0_u16,
28140    };
28141    #[cfg(feature = "arbitrary")]
28142    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28143        use arbitrary::{Arbitrary, Unstructured};
28144        let mut buf = [0u8; 1024];
28145        rng.fill_bytes(&mut buf);
28146        let mut unstructured = Unstructured::new(&buf);
28147        Self::arbitrary(&mut unstructured).unwrap_or_default()
28148    }
28149}
28150impl Default for RC_CHANNELS_OVERRIDE_DATA {
28151    fn default() -> Self {
28152        Self::DEFAULT.clone()
28153    }
28154}
28155impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
28156    type Message = MavMessage;
28157    const ID: u32 = 70u32;
28158    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
28159    const EXTRA_CRC: u8 = 124u8;
28160    const ENCODED_LEN: usize = 38usize;
28161    fn deser(
28162        _version: MavlinkVersion,
28163        __input: &[u8],
28164    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28165        let avail_len = __input.len();
28166        let mut payload_buf = [0; Self::ENCODED_LEN];
28167        let mut buf = if avail_len < Self::ENCODED_LEN {
28168            payload_buf[0..avail_len].copy_from_slice(__input);
28169            Bytes::new(&payload_buf)
28170        } else {
28171            Bytes::new(__input)
28172        };
28173        let mut __struct = Self::default();
28174        __struct.chan1_raw = buf.get_u16_le()?;
28175        __struct.chan2_raw = buf.get_u16_le()?;
28176        __struct.chan3_raw = buf.get_u16_le()?;
28177        __struct.chan4_raw = buf.get_u16_le()?;
28178        __struct.chan5_raw = buf.get_u16_le()?;
28179        __struct.chan6_raw = buf.get_u16_le()?;
28180        __struct.chan7_raw = buf.get_u16_le()?;
28181        __struct.chan8_raw = buf.get_u16_le()?;
28182        __struct.target_system = buf.get_u8()?;
28183        __struct.target_component = buf.get_u8()?;
28184        __struct.chan9_raw = buf.get_u16_le()?;
28185        __struct.chan10_raw = buf.get_u16_le()?;
28186        __struct.chan11_raw = buf.get_u16_le()?;
28187        __struct.chan12_raw = buf.get_u16_le()?;
28188        __struct.chan13_raw = buf.get_u16_le()?;
28189        __struct.chan14_raw = buf.get_u16_le()?;
28190        __struct.chan15_raw = buf.get_u16_le()?;
28191        __struct.chan16_raw = buf.get_u16_le()?;
28192        __struct.chan17_raw = buf.get_u16_le()?;
28193        __struct.chan18_raw = buf.get_u16_le()?;
28194        Ok(__struct)
28195    }
28196    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28197        let mut __tmp = BytesMut::new(bytes);
28198        #[allow(clippy::absurd_extreme_comparisons)]
28199        #[allow(unused_comparisons)]
28200        if __tmp.remaining() < Self::ENCODED_LEN {
28201            panic!(
28202                "buffer is too small (need {} bytes, but got {})",
28203                Self::ENCODED_LEN,
28204                __tmp.remaining(),
28205            )
28206        }
28207        __tmp.put_u16_le(self.chan1_raw);
28208        __tmp.put_u16_le(self.chan2_raw);
28209        __tmp.put_u16_le(self.chan3_raw);
28210        __tmp.put_u16_le(self.chan4_raw);
28211        __tmp.put_u16_le(self.chan5_raw);
28212        __tmp.put_u16_le(self.chan6_raw);
28213        __tmp.put_u16_le(self.chan7_raw);
28214        __tmp.put_u16_le(self.chan8_raw);
28215        __tmp.put_u8(self.target_system);
28216        __tmp.put_u8(self.target_component);
28217        if matches!(version, MavlinkVersion::V2) {
28218            __tmp.put_u16_le(self.chan9_raw);
28219            __tmp.put_u16_le(self.chan10_raw);
28220            __tmp.put_u16_le(self.chan11_raw);
28221            __tmp.put_u16_le(self.chan12_raw);
28222            __tmp.put_u16_le(self.chan13_raw);
28223            __tmp.put_u16_le(self.chan14_raw);
28224            __tmp.put_u16_le(self.chan15_raw);
28225            __tmp.put_u16_le(self.chan16_raw);
28226            __tmp.put_u16_le(self.chan17_raw);
28227            __tmp.put_u16_le(self.chan18_raw);
28228            let len = __tmp.len();
28229            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28230        } else {
28231            __tmp.len()
28232        }
28233    }
28234}
28235#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
28236#[doc = ""]
28237#[doc = "ID: 35"]
28238#[derive(Debug, Clone, PartialEq)]
28239#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28240#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28241#[cfg_attr(feature = "ts", derive(TS))]
28242#[cfg_attr(feature = "ts", ts(export))]
28243pub struct RC_CHANNELS_RAW_DATA {
28244    #[doc = "Timestamp (time since system boot)."]
28245    pub time_boot_ms: u32,
28246    #[doc = "RC channel 1 value."]
28247    pub chan1_raw: u16,
28248    #[doc = "RC channel 2 value."]
28249    pub chan2_raw: u16,
28250    #[doc = "RC channel 3 value."]
28251    pub chan3_raw: u16,
28252    #[doc = "RC channel 4 value."]
28253    pub chan4_raw: u16,
28254    #[doc = "RC channel 5 value."]
28255    pub chan5_raw: u16,
28256    #[doc = "RC channel 6 value."]
28257    pub chan6_raw: u16,
28258    #[doc = "RC channel 7 value."]
28259    pub chan7_raw: u16,
28260    #[doc = "RC channel 8 value."]
28261    pub chan8_raw: u16,
28262    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
28263    pub port: u8,
28264    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
28265    pub rssi: u8,
28266}
28267impl RC_CHANNELS_RAW_DATA {
28268    pub const ENCODED_LEN: usize = 22usize;
28269    pub const DEFAULT: Self = Self {
28270        time_boot_ms: 0_u32,
28271        chan1_raw: 0_u16,
28272        chan2_raw: 0_u16,
28273        chan3_raw: 0_u16,
28274        chan4_raw: 0_u16,
28275        chan5_raw: 0_u16,
28276        chan6_raw: 0_u16,
28277        chan7_raw: 0_u16,
28278        chan8_raw: 0_u16,
28279        port: 0_u8,
28280        rssi: 0_u8,
28281    };
28282    #[cfg(feature = "arbitrary")]
28283    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28284        use arbitrary::{Arbitrary, Unstructured};
28285        let mut buf = [0u8; 1024];
28286        rng.fill_bytes(&mut buf);
28287        let mut unstructured = Unstructured::new(&buf);
28288        Self::arbitrary(&mut unstructured).unwrap_or_default()
28289    }
28290}
28291impl Default for RC_CHANNELS_RAW_DATA {
28292    fn default() -> Self {
28293        Self::DEFAULT.clone()
28294    }
28295}
28296impl MessageData for RC_CHANNELS_RAW_DATA {
28297    type Message = MavMessage;
28298    const ID: u32 = 35u32;
28299    const NAME: &'static str = "RC_CHANNELS_RAW";
28300    const EXTRA_CRC: u8 = 244u8;
28301    const ENCODED_LEN: usize = 22usize;
28302    fn deser(
28303        _version: MavlinkVersion,
28304        __input: &[u8],
28305    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28306        let avail_len = __input.len();
28307        let mut payload_buf = [0; Self::ENCODED_LEN];
28308        let mut buf = if avail_len < Self::ENCODED_LEN {
28309            payload_buf[0..avail_len].copy_from_slice(__input);
28310            Bytes::new(&payload_buf)
28311        } else {
28312            Bytes::new(__input)
28313        };
28314        let mut __struct = Self::default();
28315        __struct.time_boot_ms = buf.get_u32_le()?;
28316        __struct.chan1_raw = buf.get_u16_le()?;
28317        __struct.chan2_raw = buf.get_u16_le()?;
28318        __struct.chan3_raw = buf.get_u16_le()?;
28319        __struct.chan4_raw = buf.get_u16_le()?;
28320        __struct.chan5_raw = buf.get_u16_le()?;
28321        __struct.chan6_raw = buf.get_u16_le()?;
28322        __struct.chan7_raw = buf.get_u16_le()?;
28323        __struct.chan8_raw = buf.get_u16_le()?;
28324        __struct.port = buf.get_u8()?;
28325        __struct.rssi = buf.get_u8()?;
28326        Ok(__struct)
28327    }
28328    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28329        let mut __tmp = BytesMut::new(bytes);
28330        #[allow(clippy::absurd_extreme_comparisons)]
28331        #[allow(unused_comparisons)]
28332        if __tmp.remaining() < Self::ENCODED_LEN {
28333            panic!(
28334                "buffer is too small (need {} bytes, but got {})",
28335                Self::ENCODED_LEN,
28336                __tmp.remaining(),
28337            )
28338        }
28339        __tmp.put_u32_le(self.time_boot_ms);
28340        __tmp.put_u16_le(self.chan1_raw);
28341        __tmp.put_u16_le(self.chan2_raw);
28342        __tmp.put_u16_le(self.chan3_raw);
28343        __tmp.put_u16_le(self.chan4_raw);
28344        __tmp.put_u16_le(self.chan5_raw);
28345        __tmp.put_u16_le(self.chan6_raw);
28346        __tmp.put_u16_le(self.chan7_raw);
28347        __tmp.put_u16_le(self.chan8_raw);
28348        __tmp.put_u8(self.port);
28349        __tmp.put_u8(self.rssi);
28350        if matches!(version, MavlinkVersion::V2) {
28351            let len = __tmp.len();
28352            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28353        } else {
28354            __tmp.len()
28355        }
28356    }
28357}
28358#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
28359#[doc = ""]
28360#[doc = "ID: 34"]
28361#[derive(Debug, Clone, PartialEq)]
28362#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28363#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28364#[cfg_attr(feature = "ts", derive(TS))]
28365#[cfg_attr(feature = "ts", ts(export))]
28366pub struct RC_CHANNELS_SCALED_DATA {
28367    #[doc = "Timestamp (time since system boot)."]
28368    pub time_boot_ms: u32,
28369    #[doc = "RC channel 1 value scaled."]
28370    pub chan1_scaled: i16,
28371    #[doc = "RC channel 2 value scaled."]
28372    pub chan2_scaled: i16,
28373    #[doc = "RC channel 3 value scaled."]
28374    pub chan3_scaled: i16,
28375    #[doc = "RC channel 4 value scaled."]
28376    pub chan4_scaled: i16,
28377    #[doc = "RC channel 5 value scaled."]
28378    pub chan5_scaled: i16,
28379    #[doc = "RC channel 6 value scaled."]
28380    pub chan6_scaled: i16,
28381    #[doc = "RC channel 7 value scaled."]
28382    pub chan7_scaled: i16,
28383    #[doc = "RC channel 8 value scaled."]
28384    pub chan8_scaled: i16,
28385    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
28386    pub port: u8,
28387    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
28388    pub rssi: u8,
28389}
28390impl RC_CHANNELS_SCALED_DATA {
28391    pub const ENCODED_LEN: usize = 22usize;
28392    pub const DEFAULT: Self = Self {
28393        time_boot_ms: 0_u32,
28394        chan1_scaled: 0_i16,
28395        chan2_scaled: 0_i16,
28396        chan3_scaled: 0_i16,
28397        chan4_scaled: 0_i16,
28398        chan5_scaled: 0_i16,
28399        chan6_scaled: 0_i16,
28400        chan7_scaled: 0_i16,
28401        chan8_scaled: 0_i16,
28402        port: 0_u8,
28403        rssi: 0_u8,
28404    };
28405    #[cfg(feature = "arbitrary")]
28406    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28407        use arbitrary::{Arbitrary, Unstructured};
28408        let mut buf = [0u8; 1024];
28409        rng.fill_bytes(&mut buf);
28410        let mut unstructured = Unstructured::new(&buf);
28411        Self::arbitrary(&mut unstructured).unwrap_or_default()
28412    }
28413}
28414impl Default for RC_CHANNELS_SCALED_DATA {
28415    fn default() -> Self {
28416        Self::DEFAULT.clone()
28417    }
28418}
28419impl MessageData for RC_CHANNELS_SCALED_DATA {
28420    type Message = MavMessage;
28421    const ID: u32 = 34u32;
28422    const NAME: &'static str = "RC_CHANNELS_SCALED";
28423    const EXTRA_CRC: u8 = 237u8;
28424    const ENCODED_LEN: usize = 22usize;
28425    fn deser(
28426        _version: MavlinkVersion,
28427        __input: &[u8],
28428    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28429        let avail_len = __input.len();
28430        let mut payload_buf = [0; Self::ENCODED_LEN];
28431        let mut buf = if avail_len < Self::ENCODED_LEN {
28432            payload_buf[0..avail_len].copy_from_slice(__input);
28433            Bytes::new(&payload_buf)
28434        } else {
28435            Bytes::new(__input)
28436        };
28437        let mut __struct = Self::default();
28438        __struct.time_boot_ms = buf.get_u32_le()?;
28439        __struct.chan1_scaled = buf.get_i16_le()?;
28440        __struct.chan2_scaled = buf.get_i16_le()?;
28441        __struct.chan3_scaled = buf.get_i16_le()?;
28442        __struct.chan4_scaled = buf.get_i16_le()?;
28443        __struct.chan5_scaled = buf.get_i16_le()?;
28444        __struct.chan6_scaled = buf.get_i16_le()?;
28445        __struct.chan7_scaled = buf.get_i16_le()?;
28446        __struct.chan8_scaled = buf.get_i16_le()?;
28447        __struct.port = buf.get_u8()?;
28448        __struct.rssi = buf.get_u8()?;
28449        Ok(__struct)
28450    }
28451    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28452        let mut __tmp = BytesMut::new(bytes);
28453        #[allow(clippy::absurd_extreme_comparisons)]
28454        #[allow(unused_comparisons)]
28455        if __tmp.remaining() < Self::ENCODED_LEN {
28456            panic!(
28457                "buffer is too small (need {} bytes, but got {})",
28458                Self::ENCODED_LEN,
28459                __tmp.remaining(),
28460            )
28461        }
28462        __tmp.put_u32_le(self.time_boot_ms);
28463        __tmp.put_i16_le(self.chan1_scaled);
28464        __tmp.put_i16_le(self.chan2_scaled);
28465        __tmp.put_i16_le(self.chan3_scaled);
28466        __tmp.put_i16_le(self.chan4_scaled);
28467        __tmp.put_i16_le(self.chan5_scaled);
28468        __tmp.put_i16_le(self.chan6_scaled);
28469        __tmp.put_i16_le(self.chan7_scaled);
28470        __tmp.put_i16_le(self.chan8_scaled);
28471        __tmp.put_u8(self.port);
28472        __tmp.put_u8(self.rssi);
28473        if matches!(version, MavlinkVersion::V2) {
28474            let len = __tmp.len();
28475            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28476        } else {
28477            __tmp.len()
28478        }
28479    }
28480}
28481#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
28482#[doc = "Request a data stream."]
28483#[doc = ""]
28484#[doc = "ID: 66"]
28485#[derive(Debug, Clone, PartialEq)]
28486#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28487#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28488#[cfg_attr(feature = "ts", derive(TS))]
28489#[cfg_attr(feature = "ts", ts(export))]
28490pub struct REQUEST_DATA_STREAM_DATA {
28491    #[doc = "The requested message rate"]
28492    pub req_message_rate: u16,
28493    #[doc = "The target requested to send the message stream."]
28494    pub target_system: u8,
28495    #[doc = "The target requested to send the message stream."]
28496    pub target_component: u8,
28497    #[doc = "The ID of the requested data stream"]
28498    pub req_stream_id: u8,
28499    #[doc = "1 to start sending, 0 to stop sending."]
28500    pub start_stop: u8,
28501}
28502impl REQUEST_DATA_STREAM_DATA {
28503    pub const ENCODED_LEN: usize = 6usize;
28504    pub const DEFAULT: Self = Self {
28505        req_message_rate: 0_u16,
28506        target_system: 0_u8,
28507        target_component: 0_u8,
28508        req_stream_id: 0_u8,
28509        start_stop: 0_u8,
28510    };
28511    #[cfg(feature = "arbitrary")]
28512    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28513        use arbitrary::{Arbitrary, Unstructured};
28514        let mut buf = [0u8; 1024];
28515        rng.fill_bytes(&mut buf);
28516        let mut unstructured = Unstructured::new(&buf);
28517        Self::arbitrary(&mut unstructured).unwrap_or_default()
28518    }
28519}
28520impl Default for REQUEST_DATA_STREAM_DATA {
28521    fn default() -> Self {
28522        Self::DEFAULT.clone()
28523    }
28524}
28525impl MessageData for REQUEST_DATA_STREAM_DATA {
28526    type Message = MavMessage;
28527    const ID: u32 = 66u32;
28528    const NAME: &'static str = "REQUEST_DATA_STREAM";
28529    const EXTRA_CRC: u8 = 148u8;
28530    const ENCODED_LEN: usize = 6usize;
28531    fn deser(
28532        _version: MavlinkVersion,
28533        __input: &[u8],
28534    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28535        let avail_len = __input.len();
28536        let mut payload_buf = [0; Self::ENCODED_LEN];
28537        let mut buf = if avail_len < Self::ENCODED_LEN {
28538            payload_buf[0..avail_len].copy_from_slice(__input);
28539            Bytes::new(&payload_buf)
28540        } else {
28541            Bytes::new(__input)
28542        };
28543        let mut __struct = Self::default();
28544        __struct.req_message_rate = buf.get_u16_le()?;
28545        __struct.target_system = buf.get_u8()?;
28546        __struct.target_component = buf.get_u8()?;
28547        __struct.req_stream_id = buf.get_u8()?;
28548        __struct.start_stop = buf.get_u8()?;
28549        Ok(__struct)
28550    }
28551    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28552        let mut __tmp = BytesMut::new(bytes);
28553        #[allow(clippy::absurd_extreme_comparisons)]
28554        #[allow(unused_comparisons)]
28555        if __tmp.remaining() < Self::ENCODED_LEN {
28556            panic!(
28557                "buffer is too small (need {} bytes, but got {})",
28558                Self::ENCODED_LEN,
28559                __tmp.remaining(),
28560            )
28561        }
28562        __tmp.put_u16_le(self.req_message_rate);
28563        __tmp.put_u8(self.target_system);
28564        __tmp.put_u8(self.target_component);
28565        __tmp.put_u8(self.req_stream_id);
28566        __tmp.put_u8(self.start_stop);
28567        if matches!(version, MavlinkVersion::V2) {
28568            let len = __tmp.len();
28569            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28570        } else {
28571            __tmp.len()
28572        }
28573    }
28574}
28575#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
28576#[doc = ""]
28577#[doc = "ID: 412"]
28578#[derive(Debug, Clone, PartialEq)]
28579#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28580#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28581#[cfg_attr(feature = "ts", derive(TS))]
28582#[cfg_attr(feature = "ts", ts(export))]
28583pub struct REQUEST_EVENT_DATA {
28584    #[doc = "First sequence number of the requested event."]
28585    pub first_sequence: u16,
28586    #[doc = "Last sequence number of the requested event."]
28587    pub last_sequence: u16,
28588    #[doc = "System ID"]
28589    pub target_system: u8,
28590    #[doc = "Component ID"]
28591    pub target_component: u8,
28592}
28593impl REQUEST_EVENT_DATA {
28594    pub const ENCODED_LEN: usize = 6usize;
28595    pub const DEFAULT: Self = Self {
28596        first_sequence: 0_u16,
28597        last_sequence: 0_u16,
28598        target_system: 0_u8,
28599        target_component: 0_u8,
28600    };
28601    #[cfg(feature = "arbitrary")]
28602    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28603        use arbitrary::{Arbitrary, Unstructured};
28604        let mut buf = [0u8; 1024];
28605        rng.fill_bytes(&mut buf);
28606        let mut unstructured = Unstructured::new(&buf);
28607        Self::arbitrary(&mut unstructured).unwrap_or_default()
28608    }
28609}
28610impl Default for REQUEST_EVENT_DATA {
28611    fn default() -> Self {
28612        Self::DEFAULT.clone()
28613    }
28614}
28615impl MessageData for REQUEST_EVENT_DATA {
28616    type Message = MavMessage;
28617    const ID: u32 = 412u32;
28618    const NAME: &'static str = "REQUEST_EVENT";
28619    const EXTRA_CRC: u8 = 33u8;
28620    const ENCODED_LEN: usize = 6usize;
28621    fn deser(
28622        _version: MavlinkVersion,
28623        __input: &[u8],
28624    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28625        let avail_len = __input.len();
28626        let mut payload_buf = [0; Self::ENCODED_LEN];
28627        let mut buf = if avail_len < Self::ENCODED_LEN {
28628            payload_buf[0..avail_len].copy_from_slice(__input);
28629            Bytes::new(&payload_buf)
28630        } else {
28631            Bytes::new(__input)
28632        };
28633        let mut __struct = Self::default();
28634        __struct.first_sequence = buf.get_u16_le()?;
28635        __struct.last_sequence = buf.get_u16_le()?;
28636        __struct.target_system = buf.get_u8()?;
28637        __struct.target_component = buf.get_u8()?;
28638        Ok(__struct)
28639    }
28640    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28641        let mut __tmp = BytesMut::new(bytes);
28642        #[allow(clippy::absurd_extreme_comparisons)]
28643        #[allow(unused_comparisons)]
28644        if __tmp.remaining() < Self::ENCODED_LEN {
28645            panic!(
28646                "buffer is too small (need {} bytes, but got {})",
28647                Self::ENCODED_LEN,
28648                __tmp.remaining(),
28649            )
28650        }
28651        __tmp.put_u16_le(self.first_sequence);
28652        __tmp.put_u16_le(self.last_sequence);
28653        __tmp.put_u8(self.target_system);
28654        __tmp.put_u8(self.target_component);
28655        if matches!(version, MavlinkVersion::V2) {
28656            let len = __tmp.len();
28657            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28658        } else {
28659            __tmp.len()
28660        }
28661    }
28662}
28663#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
28664#[doc = ""]
28665#[doc = "ID: 142"]
28666#[derive(Debug, Clone, PartialEq)]
28667#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28668#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28669#[cfg_attr(feature = "ts", derive(TS))]
28670#[cfg_attr(feature = "ts", ts(export))]
28671pub struct RESOURCE_REQUEST_DATA {
28672    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
28673    pub request_id: u8,
28674    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
28675    pub uri_type: u8,
28676    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
28677    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28678    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28679    pub uri: [u8; 120],
28680    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
28681    pub transfer_type: u8,
28682    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
28683    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28684    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28685    pub storage: [u8; 120],
28686}
28687impl RESOURCE_REQUEST_DATA {
28688    pub const ENCODED_LEN: usize = 243usize;
28689    pub const DEFAULT: Self = Self {
28690        request_id: 0_u8,
28691        uri_type: 0_u8,
28692        uri: [0_u8; 120usize],
28693        transfer_type: 0_u8,
28694        storage: [0_u8; 120usize],
28695    };
28696    #[cfg(feature = "arbitrary")]
28697    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28698        use arbitrary::{Arbitrary, Unstructured};
28699        let mut buf = [0u8; 1024];
28700        rng.fill_bytes(&mut buf);
28701        let mut unstructured = Unstructured::new(&buf);
28702        Self::arbitrary(&mut unstructured).unwrap_or_default()
28703    }
28704}
28705impl Default for RESOURCE_REQUEST_DATA {
28706    fn default() -> Self {
28707        Self::DEFAULT.clone()
28708    }
28709}
28710impl MessageData for RESOURCE_REQUEST_DATA {
28711    type Message = MavMessage;
28712    const ID: u32 = 142u32;
28713    const NAME: &'static str = "RESOURCE_REQUEST";
28714    const EXTRA_CRC: u8 = 72u8;
28715    const ENCODED_LEN: usize = 243usize;
28716    fn deser(
28717        _version: MavlinkVersion,
28718        __input: &[u8],
28719    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28720        let avail_len = __input.len();
28721        let mut payload_buf = [0; Self::ENCODED_LEN];
28722        let mut buf = if avail_len < Self::ENCODED_LEN {
28723            payload_buf[0..avail_len].copy_from_slice(__input);
28724            Bytes::new(&payload_buf)
28725        } else {
28726            Bytes::new(__input)
28727        };
28728        let mut __struct = Self::default();
28729        __struct.request_id = buf.get_u8()?;
28730        __struct.uri_type = buf.get_u8()?;
28731        for v in &mut __struct.uri {
28732            let val = buf.get_u8()?;
28733            *v = val;
28734        }
28735        __struct.transfer_type = buf.get_u8()?;
28736        for v in &mut __struct.storage {
28737            let val = buf.get_u8()?;
28738            *v = val;
28739        }
28740        Ok(__struct)
28741    }
28742    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28743        let mut __tmp = BytesMut::new(bytes);
28744        #[allow(clippy::absurd_extreme_comparisons)]
28745        #[allow(unused_comparisons)]
28746        if __tmp.remaining() < Self::ENCODED_LEN {
28747            panic!(
28748                "buffer is too small (need {} bytes, but got {})",
28749                Self::ENCODED_LEN,
28750                __tmp.remaining(),
28751            )
28752        }
28753        __tmp.put_u8(self.request_id);
28754        __tmp.put_u8(self.uri_type);
28755        for val in &self.uri {
28756            __tmp.put_u8(*val);
28757        }
28758        __tmp.put_u8(self.transfer_type);
28759        for val in &self.storage {
28760            __tmp.put_u8(*val);
28761        }
28762        if matches!(version, MavlinkVersion::V2) {
28763            let len = __tmp.len();
28764            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28765        } else {
28766            __tmp.len()
28767        }
28768    }
28769}
28770#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
28771#[doc = ""]
28772#[doc = "ID: 413"]
28773#[derive(Debug, Clone, PartialEq)]
28774#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28775#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28776#[cfg_attr(feature = "ts", derive(TS))]
28777#[cfg_attr(feature = "ts", ts(export))]
28778pub struct RESPONSE_EVENT_ERROR_DATA {
28779    #[doc = "Sequence number."]
28780    pub sequence: u16,
28781    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
28782    pub sequence_oldest_available: u16,
28783    #[doc = "System ID"]
28784    pub target_system: u8,
28785    #[doc = "Component ID"]
28786    pub target_component: u8,
28787    #[doc = "Error reason."]
28788    pub reason: MavEventErrorReason,
28789}
28790impl RESPONSE_EVENT_ERROR_DATA {
28791    pub const ENCODED_LEN: usize = 7usize;
28792    pub const DEFAULT: Self = Self {
28793        sequence: 0_u16,
28794        sequence_oldest_available: 0_u16,
28795        target_system: 0_u8,
28796        target_component: 0_u8,
28797        reason: MavEventErrorReason::DEFAULT,
28798    };
28799    #[cfg(feature = "arbitrary")]
28800    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28801        use arbitrary::{Arbitrary, Unstructured};
28802        let mut buf = [0u8; 1024];
28803        rng.fill_bytes(&mut buf);
28804        let mut unstructured = Unstructured::new(&buf);
28805        Self::arbitrary(&mut unstructured).unwrap_or_default()
28806    }
28807}
28808impl Default for RESPONSE_EVENT_ERROR_DATA {
28809    fn default() -> Self {
28810        Self::DEFAULT.clone()
28811    }
28812}
28813impl MessageData for RESPONSE_EVENT_ERROR_DATA {
28814    type Message = MavMessage;
28815    const ID: u32 = 413u32;
28816    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
28817    const EXTRA_CRC: u8 = 77u8;
28818    const ENCODED_LEN: usize = 7usize;
28819    fn deser(
28820        _version: MavlinkVersion,
28821        __input: &[u8],
28822    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28823        let avail_len = __input.len();
28824        let mut payload_buf = [0; Self::ENCODED_LEN];
28825        let mut buf = if avail_len < Self::ENCODED_LEN {
28826            payload_buf[0..avail_len].copy_from_slice(__input);
28827            Bytes::new(&payload_buf)
28828        } else {
28829            Bytes::new(__input)
28830        };
28831        let mut __struct = Self::default();
28832        __struct.sequence = buf.get_u16_le()?;
28833        __struct.sequence_oldest_available = buf.get_u16_le()?;
28834        __struct.target_system = buf.get_u8()?;
28835        __struct.target_component = buf.get_u8()?;
28836        let tmp = buf.get_u8()?;
28837        __struct.reason =
28838            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28839                enum_type: "MavEventErrorReason",
28840                value: tmp as u64,
28841            })?;
28842        Ok(__struct)
28843    }
28844    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28845        let mut __tmp = BytesMut::new(bytes);
28846        #[allow(clippy::absurd_extreme_comparisons)]
28847        #[allow(unused_comparisons)]
28848        if __tmp.remaining() < Self::ENCODED_LEN {
28849            panic!(
28850                "buffer is too small (need {} bytes, but got {})",
28851                Self::ENCODED_LEN,
28852                __tmp.remaining(),
28853            )
28854        }
28855        __tmp.put_u16_le(self.sequence);
28856        __tmp.put_u16_le(self.sequence_oldest_available);
28857        __tmp.put_u8(self.target_system);
28858        __tmp.put_u8(self.target_component);
28859        __tmp.put_u8(self.reason as u8);
28860        if matches!(version, MavlinkVersion::V2) {
28861            let len = __tmp.len();
28862            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28863        } else {
28864            __tmp.len()
28865        }
28866    }
28867}
28868#[doc = "Read out the safety zone the MAV currently assumes."]
28869#[doc = ""]
28870#[doc = "ID: 55"]
28871#[derive(Debug, Clone, PartialEq)]
28872#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28873#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28874#[cfg_attr(feature = "ts", derive(TS))]
28875#[cfg_attr(feature = "ts", ts(export))]
28876pub struct SAFETY_ALLOWED_AREA_DATA {
28877    #[doc = "x position 1 / Latitude 1"]
28878    pub p1x: f32,
28879    #[doc = "y position 1 / Longitude 1"]
28880    pub p1y: f32,
28881    #[doc = "z position 1 / Altitude 1"]
28882    pub p1z: f32,
28883    #[doc = "x position 2 / Latitude 2"]
28884    pub p2x: f32,
28885    #[doc = "y position 2 / Longitude 2"]
28886    pub p2y: f32,
28887    #[doc = "z position 2 / Altitude 2"]
28888    pub p2z: f32,
28889    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
28890    pub frame: MavFrame,
28891}
28892impl SAFETY_ALLOWED_AREA_DATA {
28893    pub const ENCODED_LEN: usize = 25usize;
28894    pub const DEFAULT: Self = Self {
28895        p1x: 0.0_f32,
28896        p1y: 0.0_f32,
28897        p1z: 0.0_f32,
28898        p2x: 0.0_f32,
28899        p2y: 0.0_f32,
28900        p2z: 0.0_f32,
28901        frame: MavFrame::DEFAULT,
28902    };
28903    #[cfg(feature = "arbitrary")]
28904    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28905        use arbitrary::{Arbitrary, Unstructured};
28906        let mut buf = [0u8; 1024];
28907        rng.fill_bytes(&mut buf);
28908        let mut unstructured = Unstructured::new(&buf);
28909        Self::arbitrary(&mut unstructured).unwrap_or_default()
28910    }
28911}
28912impl Default for SAFETY_ALLOWED_AREA_DATA {
28913    fn default() -> Self {
28914        Self::DEFAULT.clone()
28915    }
28916}
28917impl MessageData for SAFETY_ALLOWED_AREA_DATA {
28918    type Message = MavMessage;
28919    const ID: u32 = 55u32;
28920    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
28921    const EXTRA_CRC: u8 = 3u8;
28922    const ENCODED_LEN: usize = 25usize;
28923    fn deser(
28924        _version: MavlinkVersion,
28925        __input: &[u8],
28926    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28927        let avail_len = __input.len();
28928        let mut payload_buf = [0; Self::ENCODED_LEN];
28929        let mut buf = if avail_len < Self::ENCODED_LEN {
28930            payload_buf[0..avail_len].copy_from_slice(__input);
28931            Bytes::new(&payload_buf)
28932        } else {
28933            Bytes::new(__input)
28934        };
28935        let mut __struct = Self::default();
28936        __struct.p1x = buf.get_f32_le()?;
28937        __struct.p1y = buf.get_f32_le()?;
28938        __struct.p1z = buf.get_f32_le()?;
28939        __struct.p2x = buf.get_f32_le()?;
28940        __struct.p2y = buf.get_f32_le()?;
28941        __struct.p2z = buf.get_f32_le()?;
28942        let tmp = buf.get_u8()?;
28943        __struct.frame =
28944            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28945                enum_type: "MavFrame",
28946                value: tmp as u64,
28947            })?;
28948        Ok(__struct)
28949    }
28950    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28951        let mut __tmp = BytesMut::new(bytes);
28952        #[allow(clippy::absurd_extreme_comparisons)]
28953        #[allow(unused_comparisons)]
28954        if __tmp.remaining() < Self::ENCODED_LEN {
28955            panic!(
28956                "buffer is too small (need {} bytes, but got {})",
28957                Self::ENCODED_LEN,
28958                __tmp.remaining(),
28959            )
28960        }
28961        __tmp.put_f32_le(self.p1x);
28962        __tmp.put_f32_le(self.p1y);
28963        __tmp.put_f32_le(self.p1z);
28964        __tmp.put_f32_le(self.p2x);
28965        __tmp.put_f32_le(self.p2y);
28966        __tmp.put_f32_le(self.p2z);
28967        __tmp.put_u8(self.frame as u8);
28968        if matches!(version, MavlinkVersion::V2) {
28969            let len = __tmp.len();
28970            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28971        } else {
28972            __tmp.len()
28973        }
28974    }
28975}
28976#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
28977#[doc = ""]
28978#[doc = "ID: 54"]
28979#[derive(Debug, Clone, PartialEq)]
28980#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28981#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28982#[cfg_attr(feature = "ts", derive(TS))]
28983#[cfg_attr(feature = "ts", ts(export))]
28984pub struct SAFETY_SET_ALLOWED_AREA_DATA {
28985    #[doc = "x position 1 / Latitude 1"]
28986    pub p1x: f32,
28987    #[doc = "y position 1 / Longitude 1"]
28988    pub p1y: f32,
28989    #[doc = "z position 1 / Altitude 1"]
28990    pub p1z: f32,
28991    #[doc = "x position 2 / Latitude 2"]
28992    pub p2x: f32,
28993    #[doc = "y position 2 / Longitude 2"]
28994    pub p2y: f32,
28995    #[doc = "z position 2 / Altitude 2"]
28996    pub p2z: f32,
28997    #[doc = "System ID"]
28998    pub target_system: u8,
28999    #[doc = "Component ID"]
29000    pub target_component: u8,
29001    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
29002    pub frame: MavFrame,
29003}
29004impl SAFETY_SET_ALLOWED_AREA_DATA {
29005    pub const ENCODED_LEN: usize = 27usize;
29006    pub const DEFAULT: Self = Self {
29007        p1x: 0.0_f32,
29008        p1y: 0.0_f32,
29009        p1z: 0.0_f32,
29010        p2x: 0.0_f32,
29011        p2y: 0.0_f32,
29012        p2z: 0.0_f32,
29013        target_system: 0_u8,
29014        target_component: 0_u8,
29015        frame: MavFrame::DEFAULT,
29016    };
29017    #[cfg(feature = "arbitrary")]
29018    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29019        use arbitrary::{Arbitrary, Unstructured};
29020        let mut buf = [0u8; 1024];
29021        rng.fill_bytes(&mut buf);
29022        let mut unstructured = Unstructured::new(&buf);
29023        Self::arbitrary(&mut unstructured).unwrap_or_default()
29024    }
29025}
29026impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
29027    fn default() -> Self {
29028        Self::DEFAULT.clone()
29029    }
29030}
29031impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
29032    type Message = MavMessage;
29033    const ID: u32 = 54u32;
29034    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
29035    const EXTRA_CRC: u8 = 15u8;
29036    const ENCODED_LEN: usize = 27usize;
29037    fn deser(
29038        _version: MavlinkVersion,
29039        __input: &[u8],
29040    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29041        let avail_len = __input.len();
29042        let mut payload_buf = [0; Self::ENCODED_LEN];
29043        let mut buf = if avail_len < Self::ENCODED_LEN {
29044            payload_buf[0..avail_len].copy_from_slice(__input);
29045            Bytes::new(&payload_buf)
29046        } else {
29047            Bytes::new(__input)
29048        };
29049        let mut __struct = Self::default();
29050        __struct.p1x = buf.get_f32_le()?;
29051        __struct.p1y = buf.get_f32_le()?;
29052        __struct.p1z = buf.get_f32_le()?;
29053        __struct.p2x = buf.get_f32_le()?;
29054        __struct.p2y = buf.get_f32_le()?;
29055        __struct.p2z = buf.get_f32_le()?;
29056        __struct.target_system = buf.get_u8()?;
29057        __struct.target_component = buf.get_u8()?;
29058        let tmp = buf.get_u8()?;
29059        __struct.frame =
29060            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29061                enum_type: "MavFrame",
29062                value: tmp as u64,
29063            })?;
29064        Ok(__struct)
29065    }
29066    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29067        let mut __tmp = BytesMut::new(bytes);
29068        #[allow(clippy::absurd_extreme_comparisons)]
29069        #[allow(unused_comparisons)]
29070        if __tmp.remaining() < Self::ENCODED_LEN {
29071            panic!(
29072                "buffer is too small (need {} bytes, but got {})",
29073                Self::ENCODED_LEN,
29074                __tmp.remaining(),
29075            )
29076        }
29077        __tmp.put_f32_le(self.p1x);
29078        __tmp.put_f32_le(self.p1y);
29079        __tmp.put_f32_le(self.p1z);
29080        __tmp.put_f32_le(self.p2x);
29081        __tmp.put_f32_le(self.p2y);
29082        __tmp.put_f32_le(self.p2z);
29083        __tmp.put_u8(self.target_system);
29084        __tmp.put_u8(self.target_component);
29085        __tmp.put_u8(self.frame as u8);
29086        if matches!(version, MavlinkVersion::V2) {
29087            let len = __tmp.len();
29088            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29089        } else {
29090            __tmp.len()
29091        }
29092    }
29093}
29094#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
29095#[doc = ""]
29096#[doc = "ID: 26"]
29097#[derive(Debug, Clone, PartialEq)]
29098#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29099#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29100#[cfg_attr(feature = "ts", derive(TS))]
29101#[cfg_attr(feature = "ts", ts(export))]
29102pub struct SCALED_IMU_DATA {
29103    #[doc = "Timestamp (time since system boot)."]
29104    pub time_boot_ms: u32,
29105    #[doc = "X acceleration"]
29106    pub xacc: i16,
29107    #[doc = "Y acceleration"]
29108    pub yacc: i16,
29109    #[doc = "Z acceleration"]
29110    pub zacc: i16,
29111    #[doc = "Angular speed around X axis"]
29112    pub xgyro: i16,
29113    #[doc = "Angular speed around Y axis"]
29114    pub ygyro: i16,
29115    #[doc = "Angular speed around Z axis"]
29116    pub zgyro: i16,
29117    #[doc = "X Magnetic field"]
29118    pub xmag: i16,
29119    #[doc = "Y Magnetic field"]
29120    pub ymag: i16,
29121    #[doc = "Z Magnetic field"]
29122    pub zmag: i16,
29123    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
29124    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29125    pub temperature: i16,
29126}
29127impl SCALED_IMU_DATA {
29128    pub const ENCODED_LEN: usize = 24usize;
29129    pub const DEFAULT: Self = Self {
29130        time_boot_ms: 0_u32,
29131        xacc: 0_i16,
29132        yacc: 0_i16,
29133        zacc: 0_i16,
29134        xgyro: 0_i16,
29135        ygyro: 0_i16,
29136        zgyro: 0_i16,
29137        xmag: 0_i16,
29138        ymag: 0_i16,
29139        zmag: 0_i16,
29140        temperature: 0_i16,
29141    };
29142    #[cfg(feature = "arbitrary")]
29143    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29144        use arbitrary::{Arbitrary, Unstructured};
29145        let mut buf = [0u8; 1024];
29146        rng.fill_bytes(&mut buf);
29147        let mut unstructured = Unstructured::new(&buf);
29148        Self::arbitrary(&mut unstructured).unwrap_or_default()
29149    }
29150}
29151impl Default for SCALED_IMU_DATA {
29152    fn default() -> Self {
29153        Self::DEFAULT.clone()
29154    }
29155}
29156impl MessageData for SCALED_IMU_DATA {
29157    type Message = MavMessage;
29158    const ID: u32 = 26u32;
29159    const NAME: &'static str = "SCALED_IMU";
29160    const EXTRA_CRC: u8 = 170u8;
29161    const ENCODED_LEN: usize = 24usize;
29162    fn deser(
29163        _version: MavlinkVersion,
29164        __input: &[u8],
29165    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29166        let avail_len = __input.len();
29167        let mut payload_buf = [0; Self::ENCODED_LEN];
29168        let mut buf = if avail_len < Self::ENCODED_LEN {
29169            payload_buf[0..avail_len].copy_from_slice(__input);
29170            Bytes::new(&payload_buf)
29171        } else {
29172            Bytes::new(__input)
29173        };
29174        let mut __struct = Self::default();
29175        __struct.time_boot_ms = buf.get_u32_le()?;
29176        __struct.xacc = buf.get_i16_le()?;
29177        __struct.yacc = buf.get_i16_le()?;
29178        __struct.zacc = buf.get_i16_le()?;
29179        __struct.xgyro = buf.get_i16_le()?;
29180        __struct.ygyro = buf.get_i16_le()?;
29181        __struct.zgyro = buf.get_i16_le()?;
29182        __struct.xmag = buf.get_i16_le()?;
29183        __struct.ymag = buf.get_i16_le()?;
29184        __struct.zmag = buf.get_i16_le()?;
29185        __struct.temperature = buf.get_i16_le()?;
29186        Ok(__struct)
29187    }
29188    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29189        let mut __tmp = BytesMut::new(bytes);
29190        #[allow(clippy::absurd_extreme_comparisons)]
29191        #[allow(unused_comparisons)]
29192        if __tmp.remaining() < Self::ENCODED_LEN {
29193            panic!(
29194                "buffer is too small (need {} bytes, but got {})",
29195                Self::ENCODED_LEN,
29196                __tmp.remaining(),
29197            )
29198        }
29199        __tmp.put_u32_le(self.time_boot_ms);
29200        __tmp.put_i16_le(self.xacc);
29201        __tmp.put_i16_le(self.yacc);
29202        __tmp.put_i16_le(self.zacc);
29203        __tmp.put_i16_le(self.xgyro);
29204        __tmp.put_i16_le(self.ygyro);
29205        __tmp.put_i16_le(self.zgyro);
29206        __tmp.put_i16_le(self.xmag);
29207        __tmp.put_i16_le(self.ymag);
29208        __tmp.put_i16_le(self.zmag);
29209        if matches!(version, MavlinkVersion::V2) {
29210            __tmp.put_i16_le(self.temperature);
29211            let len = __tmp.len();
29212            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29213        } else {
29214            __tmp.len()
29215        }
29216    }
29217}
29218#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
29219#[doc = ""]
29220#[doc = "ID: 116"]
29221#[derive(Debug, Clone, PartialEq)]
29222#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29223#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29224#[cfg_attr(feature = "ts", derive(TS))]
29225#[cfg_attr(feature = "ts", ts(export))]
29226pub struct SCALED_IMU2_DATA {
29227    #[doc = "Timestamp (time since system boot)."]
29228    pub time_boot_ms: u32,
29229    #[doc = "X acceleration"]
29230    pub xacc: i16,
29231    #[doc = "Y acceleration"]
29232    pub yacc: i16,
29233    #[doc = "Z acceleration"]
29234    pub zacc: i16,
29235    #[doc = "Angular speed around X axis"]
29236    pub xgyro: i16,
29237    #[doc = "Angular speed around Y axis"]
29238    pub ygyro: i16,
29239    #[doc = "Angular speed around Z axis"]
29240    pub zgyro: i16,
29241    #[doc = "X Magnetic field"]
29242    pub xmag: i16,
29243    #[doc = "Y Magnetic field"]
29244    pub ymag: i16,
29245    #[doc = "Z Magnetic field"]
29246    pub zmag: i16,
29247    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
29248    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29249    pub temperature: i16,
29250}
29251impl SCALED_IMU2_DATA {
29252    pub const ENCODED_LEN: usize = 24usize;
29253    pub const DEFAULT: Self = Self {
29254        time_boot_ms: 0_u32,
29255        xacc: 0_i16,
29256        yacc: 0_i16,
29257        zacc: 0_i16,
29258        xgyro: 0_i16,
29259        ygyro: 0_i16,
29260        zgyro: 0_i16,
29261        xmag: 0_i16,
29262        ymag: 0_i16,
29263        zmag: 0_i16,
29264        temperature: 0_i16,
29265    };
29266    #[cfg(feature = "arbitrary")]
29267    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29268        use arbitrary::{Arbitrary, Unstructured};
29269        let mut buf = [0u8; 1024];
29270        rng.fill_bytes(&mut buf);
29271        let mut unstructured = Unstructured::new(&buf);
29272        Self::arbitrary(&mut unstructured).unwrap_or_default()
29273    }
29274}
29275impl Default for SCALED_IMU2_DATA {
29276    fn default() -> Self {
29277        Self::DEFAULT.clone()
29278    }
29279}
29280impl MessageData for SCALED_IMU2_DATA {
29281    type Message = MavMessage;
29282    const ID: u32 = 116u32;
29283    const NAME: &'static str = "SCALED_IMU2";
29284    const EXTRA_CRC: u8 = 76u8;
29285    const ENCODED_LEN: usize = 24usize;
29286    fn deser(
29287        _version: MavlinkVersion,
29288        __input: &[u8],
29289    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29290        let avail_len = __input.len();
29291        let mut payload_buf = [0; Self::ENCODED_LEN];
29292        let mut buf = if avail_len < Self::ENCODED_LEN {
29293            payload_buf[0..avail_len].copy_from_slice(__input);
29294            Bytes::new(&payload_buf)
29295        } else {
29296            Bytes::new(__input)
29297        };
29298        let mut __struct = Self::default();
29299        __struct.time_boot_ms = buf.get_u32_le()?;
29300        __struct.xacc = buf.get_i16_le()?;
29301        __struct.yacc = buf.get_i16_le()?;
29302        __struct.zacc = buf.get_i16_le()?;
29303        __struct.xgyro = buf.get_i16_le()?;
29304        __struct.ygyro = buf.get_i16_le()?;
29305        __struct.zgyro = buf.get_i16_le()?;
29306        __struct.xmag = buf.get_i16_le()?;
29307        __struct.ymag = buf.get_i16_le()?;
29308        __struct.zmag = buf.get_i16_le()?;
29309        __struct.temperature = buf.get_i16_le()?;
29310        Ok(__struct)
29311    }
29312    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29313        let mut __tmp = BytesMut::new(bytes);
29314        #[allow(clippy::absurd_extreme_comparisons)]
29315        #[allow(unused_comparisons)]
29316        if __tmp.remaining() < Self::ENCODED_LEN {
29317            panic!(
29318                "buffer is too small (need {} bytes, but got {})",
29319                Self::ENCODED_LEN,
29320                __tmp.remaining(),
29321            )
29322        }
29323        __tmp.put_u32_le(self.time_boot_ms);
29324        __tmp.put_i16_le(self.xacc);
29325        __tmp.put_i16_le(self.yacc);
29326        __tmp.put_i16_le(self.zacc);
29327        __tmp.put_i16_le(self.xgyro);
29328        __tmp.put_i16_le(self.ygyro);
29329        __tmp.put_i16_le(self.zgyro);
29330        __tmp.put_i16_le(self.xmag);
29331        __tmp.put_i16_le(self.ymag);
29332        __tmp.put_i16_le(self.zmag);
29333        if matches!(version, MavlinkVersion::V2) {
29334            __tmp.put_i16_le(self.temperature);
29335            let len = __tmp.len();
29336            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29337        } else {
29338            __tmp.len()
29339        }
29340    }
29341}
29342#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
29343#[doc = ""]
29344#[doc = "ID: 129"]
29345#[derive(Debug, Clone, PartialEq)]
29346#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29347#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29348#[cfg_attr(feature = "ts", derive(TS))]
29349#[cfg_attr(feature = "ts", ts(export))]
29350pub struct SCALED_IMU3_DATA {
29351    #[doc = "Timestamp (time since system boot)."]
29352    pub time_boot_ms: u32,
29353    #[doc = "X acceleration"]
29354    pub xacc: i16,
29355    #[doc = "Y acceleration"]
29356    pub yacc: i16,
29357    #[doc = "Z acceleration"]
29358    pub zacc: i16,
29359    #[doc = "Angular speed around X axis"]
29360    pub xgyro: i16,
29361    #[doc = "Angular speed around Y axis"]
29362    pub ygyro: i16,
29363    #[doc = "Angular speed around Z axis"]
29364    pub zgyro: i16,
29365    #[doc = "X Magnetic field"]
29366    pub xmag: i16,
29367    #[doc = "Y Magnetic field"]
29368    pub ymag: i16,
29369    #[doc = "Z Magnetic field"]
29370    pub zmag: i16,
29371    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
29372    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29373    pub temperature: i16,
29374}
29375impl SCALED_IMU3_DATA {
29376    pub const ENCODED_LEN: usize = 24usize;
29377    pub const DEFAULT: Self = Self {
29378        time_boot_ms: 0_u32,
29379        xacc: 0_i16,
29380        yacc: 0_i16,
29381        zacc: 0_i16,
29382        xgyro: 0_i16,
29383        ygyro: 0_i16,
29384        zgyro: 0_i16,
29385        xmag: 0_i16,
29386        ymag: 0_i16,
29387        zmag: 0_i16,
29388        temperature: 0_i16,
29389    };
29390    #[cfg(feature = "arbitrary")]
29391    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29392        use arbitrary::{Arbitrary, Unstructured};
29393        let mut buf = [0u8; 1024];
29394        rng.fill_bytes(&mut buf);
29395        let mut unstructured = Unstructured::new(&buf);
29396        Self::arbitrary(&mut unstructured).unwrap_or_default()
29397    }
29398}
29399impl Default for SCALED_IMU3_DATA {
29400    fn default() -> Self {
29401        Self::DEFAULT.clone()
29402    }
29403}
29404impl MessageData for SCALED_IMU3_DATA {
29405    type Message = MavMessage;
29406    const ID: u32 = 129u32;
29407    const NAME: &'static str = "SCALED_IMU3";
29408    const EXTRA_CRC: u8 = 46u8;
29409    const ENCODED_LEN: usize = 24usize;
29410    fn deser(
29411        _version: MavlinkVersion,
29412        __input: &[u8],
29413    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29414        let avail_len = __input.len();
29415        let mut payload_buf = [0; Self::ENCODED_LEN];
29416        let mut buf = if avail_len < Self::ENCODED_LEN {
29417            payload_buf[0..avail_len].copy_from_slice(__input);
29418            Bytes::new(&payload_buf)
29419        } else {
29420            Bytes::new(__input)
29421        };
29422        let mut __struct = Self::default();
29423        __struct.time_boot_ms = buf.get_u32_le()?;
29424        __struct.xacc = buf.get_i16_le()?;
29425        __struct.yacc = buf.get_i16_le()?;
29426        __struct.zacc = buf.get_i16_le()?;
29427        __struct.xgyro = buf.get_i16_le()?;
29428        __struct.ygyro = buf.get_i16_le()?;
29429        __struct.zgyro = buf.get_i16_le()?;
29430        __struct.xmag = buf.get_i16_le()?;
29431        __struct.ymag = buf.get_i16_le()?;
29432        __struct.zmag = buf.get_i16_le()?;
29433        __struct.temperature = buf.get_i16_le()?;
29434        Ok(__struct)
29435    }
29436    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29437        let mut __tmp = BytesMut::new(bytes);
29438        #[allow(clippy::absurd_extreme_comparisons)]
29439        #[allow(unused_comparisons)]
29440        if __tmp.remaining() < Self::ENCODED_LEN {
29441            panic!(
29442                "buffer is too small (need {} bytes, but got {})",
29443                Self::ENCODED_LEN,
29444                __tmp.remaining(),
29445            )
29446        }
29447        __tmp.put_u32_le(self.time_boot_ms);
29448        __tmp.put_i16_le(self.xacc);
29449        __tmp.put_i16_le(self.yacc);
29450        __tmp.put_i16_le(self.zacc);
29451        __tmp.put_i16_le(self.xgyro);
29452        __tmp.put_i16_le(self.ygyro);
29453        __tmp.put_i16_le(self.zgyro);
29454        __tmp.put_i16_le(self.xmag);
29455        __tmp.put_i16_le(self.ymag);
29456        __tmp.put_i16_le(self.zmag);
29457        if matches!(version, MavlinkVersion::V2) {
29458            __tmp.put_i16_le(self.temperature);
29459            let len = __tmp.len();
29460            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29461        } else {
29462            __tmp.len()
29463        }
29464    }
29465}
29466#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
29467#[doc = ""]
29468#[doc = "ID: 29"]
29469#[derive(Debug, Clone, PartialEq)]
29470#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29471#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29472#[cfg_attr(feature = "ts", derive(TS))]
29473#[cfg_attr(feature = "ts", ts(export))]
29474pub struct SCALED_PRESSURE_DATA {
29475    #[doc = "Timestamp (time since system boot)."]
29476    pub time_boot_ms: u32,
29477    #[doc = "Absolute pressure"]
29478    pub press_abs: f32,
29479    #[doc = "Differential pressure 1"]
29480    pub press_diff: f32,
29481    #[doc = "Absolute pressure temperature"]
29482    pub temperature: i16,
29483    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
29484    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29485    pub temperature_press_diff: i16,
29486}
29487impl SCALED_PRESSURE_DATA {
29488    pub const ENCODED_LEN: usize = 16usize;
29489    pub const DEFAULT: Self = Self {
29490        time_boot_ms: 0_u32,
29491        press_abs: 0.0_f32,
29492        press_diff: 0.0_f32,
29493        temperature: 0_i16,
29494        temperature_press_diff: 0_i16,
29495    };
29496    #[cfg(feature = "arbitrary")]
29497    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29498        use arbitrary::{Arbitrary, Unstructured};
29499        let mut buf = [0u8; 1024];
29500        rng.fill_bytes(&mut buf);
29501        let mut unstructured = Unstructured::new(&buf);
29502        Self::arbitrary(&mut unstructured).unwrap_or_default()
29503    }
29504}
29505impl Default for SCALED_PRESSURE_DATA {
29506    fn default() -> Self {
29507        Self::DEFAULT.clone()
29508    }
29509}
29510impl MessageData for SCALED_PRESSURE_DATA {
29511    type Message = MavMessage;
29512    const ID: u32 = 29u32;
29513    const NAME: &'static str = "SCALED_PRESSURE";
29514    const EXTRA_CRC: u8 = 115u8;
29515    const ENCODED_LEN: usize = 16usize;
29516    fn deser(
29517        _version: MavlinkVersion,
29518        __input: &[u8],
29519    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29520        let avail_len = __input.len();
29521        let mut payload_buf = [0; Self::ENCODED_LEN];
29522        let mut buf = if avail_len < Self::ENCODED_LEN {
29523            payload_buf[0..avail_len].copy_from_slice(__input);
29524            Bytes::new(&payload_buf)
29525        } else {
29526            Bytes::new(__input)
29527        };
29528        let mut __struct = Self::default();
29529        __struct.time_boot_ms = buf.get_u32_le()?;
29530        __struct.press_abs = buf.get_f32_le()?;
29531        __struct.press_diff = buf.get_f32_le()?;
29532        __struct.temperature = buf.get_i16_le()?;
29533        __struct.temperature_press_diff = buf.get_i16_le()?;
29534        Ok(__struct)
29535    }
29536    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29537        let mut __tmp = BytesMut::new(bytes);
29538        #[allow(clippy::absurd_extreme_comparisons)]
29539        #[allow(unused_comparisons)]
29540        if __tmp.remaining() < Self::ENCODED_LEN {
29541            panic!(
29542                "buffer is too small (need {} bytes, but got {})",
29543                Self::ENCODED_LEN,
29544                __tmp.remaining(),
29545            )
29546        }
29547        __tmp.put_u32_le(self.time_boot_ms);
29548        __tmp.put_f32_le(self.press_abs);
29549        __tmp.put_f32_le(self.press_diff);
29550        __tmp.put_i16_le(self.temperature);
29551        if matches!(version, MavlinkVersion::V2) {
29552            __tmp.put_i16_le(self.temperature_press_diff);
29553            let len = __tmp.len();
29554            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29555        } else {
29556            __tmp.len()
29557        }
29558    }
29559}
29560#[doc = "Barometer readings for 2nd barometer."]
29561#[doc = ""]
29562#[doc = "ID: 137"]
29563#[derive(Debug, Clone, PartialEq)]
29564#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29565#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29566#[cfg_attr(feature = "ts", derive(TS))]
29567#[cfg_attr(feature = "ts", ts(export))]
29568pub struct SCALED_PRESSURE2_DATA {
29569    #[doc = "Timestamp (time since system boot)."]
29570    pub time_boot_ms: u32,
29571    #[doc = "Absolute pressure"]
29572    pub press_abs: f32,
29573    #[doc = "Differential pressure"]
29574    pub press_diff: f32,
29575    #[doc = "Absolute pressure temperature"]
29576    pub temperature: i16,
29577    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
29578    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29579    pub temperature_press_diff: i16,
29580}
29581impl SCALED_PRESSURE2_DATA {
29582    pub const ENCODED_LEN: usize = 16usize;
29583    pub const DEFAULT: Self = Self {
29584        time_boot_ms: 0_u32,
29585        press_abs: 0.0_f32,
29586        press_diff: 0.0_f32,
29587        temperature: 0_i16,
29588        temperature_press_diff: 0_i16,
29589    };
29590    #[cfg(feature = "arbitrary")]
29591    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29592        use arbitrary::{Arbitrary, Unstructured};
29593        let mut buf = [0u8; 1024];
29594        rng.fill_bytes(&mut buf);
29595        let mut unstructured = Unstructured::new(&buf);
29596        Self::arbitrary(&mut unstructured).unwrap_or_default()
29597    }
29598}
29599impl Default for SCALED_PRESSURE2_DATA {
29600    fn default() -> Self {
29601        Self::DEFAULT.clone()
29602    }
29603}
29604impl MessageData for SCALED_PRESSURE2_DATA {
29605    type Message = MavMessage;
29606    const ID: u32 = 137u32;
29607    const NAME: &'static str = "SCALED_PRESSURE2";
29608    const EXTRA_CRC: u8 = 195u8;
29609    const ENCODED_LEN: usize = 16usize;
29610    fn deser(
29611        _version: MavlinkVersion,
29612        __input: &[u8],
29613    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29614        let avail_len = __input.len();
29615        let mut payload_buf = [0; Self::ENCODED_LEN];
29616        let mut buf = if avail_len < Self::ENCODED_LEN {
29617            payload_buf[0..avail_len].copy_from_slice(__input);
29618            Bytes::new(&payload_buf)
29619        } else {
29620            Bytes::new(__input)
29621        };
29622        let mut __struct = Self::default();
29623        __struct.time_boot_ms = buf.get_u32_le()?;
29624        __struct.press_abs = buf.get_f32_le()?;
29625        __struct.press_diff = buf.get_f32_le()?;
29626        __struct.temperature = buf.get_i16_le()?;
29627        __struct.temperature_press_diff = buf.get_i16_le()?;
29628        Ok(__struct)
29629    }
29630    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29631        let mut __tmp = BytesMut::new(bytes);
29632        #[allow(clippy::absurd_extreme_comparisons)]
29633        #[allow(unused_comparisons)]
29634        if __tmp.remaining() < Self::ENCODED_LEN {
29635            panic!(
29636                "buffer is too small (need {} bytes, but got {})",
29637                Self::ENCODED_LEN,
29638                __tmp.remaining(),
29639            )
29640        }
29641        __tmp.put_u32_le(self.time_boot_ms);
29642        __tmp.put_f32_le(self.press_abs);
29643        __tmp.put_f32_le(self.press_diff);
29644        __tmp.put_i16_le(self.temperature);
29645        if matches!(version, MavlinkVersion::V2) {
29646            __tmp.put_i16_le(self.temperature_press_diff);
29647            let len = __tmp.len();
29648            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29649        } else {
29650            __tmp.len()
29651        }
29652    }
29653}
29654#[doc = "Barometer readings for 3rd barometer."]
29655#[doc = ""]
29656#[doc = "ID: 143"]
29657#[derive(Debug, Clone, PartialEq)]
29658#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29659#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29660#[cfg_attr(feature = "ts", derive(TS))]
29661#[cfg_attr(feature = "ts", ts(export))]
29662pub struct SCALED_PRESSURE3_DATA {
29663    #[doc = "Timestamp (time since system boot)."]
29664    pub time_boot_ms: u32,
29665    #[doc = "Absolute pressure"]
29666    pub press_abs: f32,
29667    #[doc = "Differential pressure"]
29668    pub press_diff: f32,
29669    #[doc = "Absolute pressure temperature"]
29670    pub temperature: i16,
29671    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
29672    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29673    pub temperature_press_diff: i16,
29674}
29675impl SCALED_PRESSURE3_DATA {
29676    pub const ENCODED_LEN: usize = 16usize;
29677    pub const DEFAULT: Self = Self {
29678        time_boot_ms: 0_u32,
29679        press_abs: 0.0_f32,
29680        press_diff: 0.0_f32,
29681        temperature: 0_i16,
29682        temperature_press_diff: 0_i16,
29683    };
29684    #[cfg(feature = "arbitrary")]
29685    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29686        use arbitrary::{Arbitrary, Unstructured};
29687        let mut buf = [0u8; 1024];
29688        rng.fill_bytes(&mut buf);
29689        let mut unstructured = Unstructured::new(&buf);
29690        Self::arbitrary(&mut unstructured).unwrap_or_default()
29691    }
29692}
29693impl Default for SCALED_PRESSURE3_DATA {
29694    fn default() -> Self {
29695        Self::DEFAULT.clone()
29696    }
29697}
29698impl MessageData for SCALED_PRESSURE3_DATA {
29699    type Message = MavMessage;
29700    const ID: u32 = 143u32;
29701    const NAME: &'static str = "SCALED_PRESSURE3";
29702    const EXTRA_CRC: u8 = 131u8;
29703    const ENCODED_LEN: usize = 16usize;
29704    fn deser(
29705        _version: MavlinkVersion,
29706        __input: &[u8],
29707    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29708        let avail_len = __input.len();
29709        let mut payload_buf = [0; Self::ENCODED_LEN];
29710        let mut buf = if avail_len < Self::ENCODED_LEN {
29711            payload_buf[0..avail_len].copy_from_slice(__input);
29712            Bytes::new(&payload_buf)
29713        } else {
29714            Bytes::new(__input)
29715        };
29716        let mut __struct = Self::default();
29717        __struct.time_boot_ms = buf.get_u32_le()?;
29718        __struct.press_abs = buf.get_f32_le()?;
29719        __struct.press_diff = buf.get_f32_le()?;
29720        __struct.temperature = buf.get_i16_le()?;
29721        __struct.temperature_press_diff = buf.get_i16_le()?;
29722        Ok(__struct)
29723    }
29724    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29725        let mut __tmp = BytesMut::new(bytes);
29726        #[allow(clippy::absurd_extreme_comparisons)]
29727        #[allow(unused_comparisons)]
29728        if __tmp.remaining() < Self::ENCODED_LEN {
29729            panic!(
29730                "buffer is too small (need {} bytes, but got {})",
29731                Self::ENCODED_LEN,
29732                __tmp.remaining(),
29733            )
29734        }
29735        __tmp.put_u32_le(self.time_boot_ms);
29736        __tmp.put_f32_le(self.press_abs);
29737        __tmp.put_f32_le(self.press_diff);
29738        __tmp.put_i16_le(self.temperature);
29739        if matches!(version, MavlinkVersion::V2) {
29740            __tmp.put_i16_le(self.temperature_press_diff);
29741            let len = __tmp.len();
29742            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29743        } else {
29744            __tmp.len()
29745        }
29746    }
29747}
29748#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
29749#[doc = ""]
29750#[doc = "ID: 126"]
29751#[derive(Debug, Clone, PartialEq)]
29752#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29753#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29754#[cfg_attr(feature = "ts", derive(TS))]
29755#[cfg_attr(feature = "ts", ts(export))]
29756pub struct SERIAL_CONTROL_DATA {
29757    #[doc = "Baudrate of transfer. Zero means no change."]
29758    pub baudrate: u32,
29759    #[doc = "Timeout for reply data"]
29760    pub timeout: u16,
29761    #[doc = "Serial control device type."]
29762    pub device: SerialControlDev,
29763    #[doc = "Bitmap of serial control flags."]
29764    pub flags: SerialControlFlag,
29765    #[doc = "how many bytes in this transfer"]
29766    pub count: u8,
29767    #[doc = "serial data"]
29768    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29769    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29770    pub data: [u8; 70],
29771    #[doc = "System ID"]
29772    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29773    pub target_system: u8,
29774    #[doc = "Component ID"]
29775    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29776    pub target_component: u8,
29777}
29778impl SERIAL_CONTROL_DATA {
29779    pub const ENCODED_LEN: usize = 81usize;
29780    pub const DEFAULT: Self = Self {
29781        baudrate: 0_u32,
29782        timeout: 0_u16,
29783        device: SerialControlDev::DEFAULT,
29784        flags: SerialControlFlag::DEFAULT,
29785        count: 0_u8,
29786        data: [0_u8; 70usize],
29787        target_system: 0_u8,
29788        target_component: 0_u8,
29789    };
29790    #[cfg(feature = "arbitrary")]
29791    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29792        use arbitrary::{Arbitrary, Unstructured};
29793        let mut buf = [0u8; 1024];
29794        rng.fill_bytes(&mut buf);
29795        let mut unstructured = Unstructured::new(&buf);
29796        Self::arbitrary(&mut unstructured).unwrap_or_default()
29797    }
29798}
29799impl Default for SERIAL_CONTROL_DATA {
29800    fn default() -> Self {
29801        Self::DEFAULT.clone()
29802    }
29803}
29804impl MessageData for SERIAL_CONTROL_DATA {
29805    type Message = MavMessage;
29806    const ID: u32 = 126u32;
29807    const NAME: &'static str = "SERIAL_CONTROL";
29808    const EXTRA_CRC: u8 = 220u8;
29809    const ENCODED_LEN: usize = 81usize;
29810    fn deser(
29811        _version: MavlinkVersion,
29812        __input: &[u8],
29813    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29814        let avail_len = __input.len();
29815        let mut payload_buf = [0; Self::ENCODED_LEN];
29816        let mut buf = if avail_len < Self::ENCODED_LEN {
29817            payload_buf[0..avail_len].copy_from_slice(__input);
29818            Bytes::new(&payload_buf)
29819        } else {
29820            Bytes::new(__input)
29821        };
29822        let mut __struct = Self::default();
29823        __struct.baudrate = buf.get_u32_le()?;
29824        __struct.timeout = buf.get_u16_le()?;
29825        let tmp = buf.get_u8()?;
29826        __struct.device =
29827            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29828                enum_type: "SerialControlDev",
29829                value: tmp as u64,
29830            })?;
29831        let tmp = buf.get_u8()?;
29832        __struct.flags = SerialControlFlag::from_bits(tmp as <SerialControlFlag as Flags>::Bits)
29833            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29834                flag_type: "SerialControlFlag",
29835                value: tmp as u64,
29836            })?;
29837        __struct.count = buf.get_u8()?;
29838        for v in &mut __struct.data {
29839            let val = buf.get_u8()?;
29840            *v = val;
29841        }
29842        __struct.target_system = buf.get_u8()?;
29843        __struct.target_component = buf.get_u8()?;
29844        Ok(__struct)
29845    }
29846    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29847        let mut __tmp = BytesMut::new(bytes);
29848        #[allow(clippy::absurd_extreme_comparisons)]
29849        #[allow(unused_comparisons)]
29850        if __tmp.remaining() < Self::ENCODED_LEN {
29851            panic!(
29852                "buffer is too small (need {} bytes, but got {})",
29853                Self::ENCODED_LEN,
29854                __tmp.remaining(),
29855            )
29856        }
29857        __tmp.put_u32_le(self.baudrate);
29858        __tmp.put_u16_le(self.timeout);
29859        __tmp.put_u8(self.device as u8);
29860        __tmp.put_u8(self.flags.bits() as u8);
29861        __tmp.put_u8(self.count);
29862        for val in &self.data {
29863            __tmp.put_u8(*val);
29864        }
29865        if matches!(version, MavlinkVersion::V2) {
29866            __tmp.put_u8(self.target_system);
29867            __tmp.put_u8(self.target_component);
29868            let len = __tmp.len();
29869            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29870        } else {
29871            __tmp.len()
29872        }
29873    }
29874}
29875#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
29876#[doc = ""]
29877#[doc = "ID: 36"]
29878#[derive(Debug, Clone, PartialEq)]
29879#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29880#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29881#[cfg_attr(feature = "ts", derive(TS))]
29882#[cfg_attr(feature = "ts", ts(export))]
29883pub struct SERVO_OUTPUT_RAW_DATA {
29884    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29885    pub time_usec: u32,
29886    #[doc = "Servo output 1 value"]
29887    pub servo1_raw: u16,
29888    #[doc = "Servo output 2 value"]
29889    pub servo2_raw: u16,
29890    #[doc = "Servo output 3 value"]
29891    pub servo3_raw: u16,
29892    #[doc = "Servo output 4 value"]
29893    pub servo4_raw: u16,
29894    #[doc = "Servo output 5 value"]
29895    pub servo5_raw: u16,
29896    #[doc = "Servo output 6 value"]
29897    pub servo6_raw: u16,
29898    #[doc = "Servo output 7 value"]
29899    pub servo7_raw: u16,
29900    #[doc = "Servo output 8 value"]
29901    pub servo8_raw: u16,
29902    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
29903    pub port: u8,
29904    #[doc = "Servo output 9 value"]
29905    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29906    pub servo9_raw: u16,
29907    #[doc = "Servo output 10 value"]
29908    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29909    pub servo10_raw: u16,
29910    #[doc = "Servo output 11 value"]
29911    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29912    pub servo11_raw: u16,
29913    #[doc = "Servo output 12 value"]
29914    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29915    pub servo12_raw: u16,
29916    #[doc = "Servo output 13 value"]
29917    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29918    pub servo13_raw: u16,
29919    #[doc = "Servo output 14 value"]
29920    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29921    pub servo14_raw: u16,
29922    #[doc = "Servo output 15 value"]
29923    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29924    pub servo15_raw: u16,
29925    #[doc = "Servo output 16 value"]
29926    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29927    pub servo16_raw: u16,
29928}
29929impl SERVO_OUTPUT_RAW_DATA {
29930    pub const ENCODED_LEN: usize = 37usize;
29931    pub const DEFAULT: Self = Self {
29932        time_usec: 0_u32,
29933        servo1_raw: 0_u16,
29934        servo2_raw: 0_u16,
29935        servo3_raw: 0_u16,
29936        servo4_raw: 0_u16,
29937        servo5_raw: 0_u16,
29938        servo6_raw: 0_u16,
29939        servo7_raw: 0_u16,
29940        servo8_raw: 0_u16,
29941        port: 0_u8,
29942        servo9_raw: 0_u16,
29943        servo10_raw: 0_u16,
29944        servo11_raw: 0_u16,
29945        servo12_raw: 0_u16,
29946        servo13_raw: 0_u16,
29947        servo14_raw: 0_u16,
29948        servo15_raw: 0_u16,
29949        servo16_raw: 0_u16,
29950    };
29951    #[cfg(feature = "arbitrary")]
29952    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29953        use arbitrary::{Arbitrary, Unstructured};
29954        let mut buf = [0u8; 1024];
29955        rng.fill_bytes(&mut buf);
29956        let mut unstructured = Unstructured::new(&buf);
29957        Self::arbitrary(&mut unstructured).unwrap_or_default()
29958    }
29959}
29960impl Default for SERVO_OUTPUT_RAW_DATA {
29961    fn default() -> Self {
29962        Self::DEFAULT.clone()
29963    }
29964}
29965impl MessageData for SERVO_OUTPUT_RAW_DATA {
29966    type Message = MavMessage;
29967    const ID: u32 = 36u32;
29968    const NAME: &'static str = "SERVO_OUTPUT_RAW";
29969    const EXTRA_CRC: u8 = 222u8;
29970    const ENCODED_LEN: usize = 37usize;
29971    fn deser(
29972        _version: MavlinkVersion,
29973        __input: &[u8],
29974    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29975        let avail_len = __input.len();
29976        let mut payload_buf = [0; Self::ENCODED_LEN];
29977        let mut buf = if avail_len < Self::ENCODED_LEN {
29978            payload_buf[0..avail_len].copy_from_slice(__input);
29979            Bytes::new(&payload_buf)
29980        } else {
29981            Bytes::new(__input)
29982        };
29983        let mut __struct = Self::default();
29984        __struct.time_usec = buf.get_u32_le()?;
29985        __struct.servo1_raw = buf.get_u16_le()?;
29986        __struct.servo2_raw = buf.get_u16_le()?;
29987        __struct.servo3_raw = buf.get_u16_le()?;
29988        __struct.servo4_raw = buf.get_u16_le()?;
29989        __struct.servo5_raw = buf.get_u16_le()?;
29990        __struct.servo6_raw = buf.get_u16_le()?;
29991        __struct.servo7_raw = buf.get_u16_le()?;
29992        __struct.servo8_raw = buf.get_u16_le()?;
29993        __struct.port = buf.get_u8()?;
29994        __struct.servo9_raw = buf.get_u16_le()?;
29995        __struct.servo10_raw = buf.get_u16_le()?;
29996        __struct.servo11_raw = buf.get_u16_le()?;
29997        __struct.servo12_raw = buf.get_u16_le()?;
29998        __struct.servo13_raw = buf.get_u16_le()?;
29999        __struct.servo14_raw = buf.get_u16_le()?;
30000        __struct.servo15_raw = buf.get_u16_le()?;
30001        __struct.servo16_raw = buf.get_u16_le()?;
30002        Ok(__struct)
30003    }
30004    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30005        let mut __tmp = BytesMut::new(bytes);
30006        #[allow(clippy::absurd_extreme_comparisons)]
30007        #[allow(unused_comparisons)]
30008        if __tmp.remaining() < Self::ENCODED_LEN {
30009            panic!(
30010                "buffer is too small (need {} bytes, but got {})",
30011                Self::ENCODED_LEN,
30012                __tmp.remaining(),
30013            )
30014        }
30015        __tmp.put_u32_le(self.time_usec);
30016        __tmp.put_u16_le(self.servo1_raw);
30017        __tmp.put_u16_le(self.servo2_raw);
30018        __tmp.put_u16_le(self.servo3_raw);
30019        __tmp.put_u16_le(self.servo4_raw);
30020        __tmp.put_u16_le(self.servo5_raw);
30021        __tmp.put_u16_le(self.servo6_raw);
30022        __tmp.put_u16_le(self.servo7_raw);
30023        __tmp.put_u16_le(self.servo8_raw);
30024        __tmp.put_u8(self.port);
30025        if matches!(version, MavlinkVersion::V2) {
30026            __tmp.put_u16_le(self.servo9_raw);
30027            __tmp.put_u16_le(self.servo10_raw);
30028            __tmp.put_u16_le(self.servo11_raw);
30029            __tmp.put_u16_le(self.servo12_raw);
30030            __tmp.put_u16_le(self.servo13_raw);
30031            __tmp.put_u16_le(self.servo14_raw);
30032            __tmp.put_u16_le(self.servo15_raw);
30033            __tmp.put_u16_le(self.servo16_raw);
30034            let len = __tmp.len();
30035            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30036        } else {
30037            __tmp.len()
30038        }
30039    }
30040}
30041#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
30042#[doc = ""]
30043#[doc = "ID: 256"]
30044#[derive(Debug, Clone, PartialEq)]
30045#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30046#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30047#[cfg_attr(feature = "ts", derive(TS))]
30048#[cfg_attr(feature = "ts", ts(export))]
30049pub struct SETUP_SIGNING_DATA {
30050    #[doc = "initial timestamp"]
30051    pub initial_timestamp: u64,
30052    #[doc = "system id of the target"]
30053    pub target_system: u8,
30054    #[doc = "component ID of the target"]
30055    pub target_component: u8,
30056    #[doc = "signing key"]
30057    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30058    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30059    pub secret_key: [u8; 32],
30060}
30061impl SETUP_SIGNING_DATA {
30062    pub const ENCODED_LEN: usize = 42usize;
30063    pub const DEFAULT: Self = Self {
30064        initial_timestamp: 0_u64,
30065        target_system: 0_u8,
30066        target_component: 0_u8,
30067        secret_key: [0_u8; 32usize],
30068    };
30069    #[cfg(feature = "arbitrary")]
30070    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30071        use arbitrary::{Arbitrary, Unstructured};
30072        let mut buf = [0u8; 1024];
30073        rng.fill_bytes(&mut buf);
30074        let mut unstructured = Unstructured::new(&buf);
30075        Self::arbitrary(&mut unstructured).unwrap_or_default()
30076    }
30077}
30078impl Default for SETUP_SIGNING_DATA {
30079    fn default() -> Self {
30080        Self::DEFAULT.clone()
30081    }
30082}
30083impl MessageData for SETUP_SIGNING_DATA {
30084    type Message = MavMessage;
30085    const ID: u32 = 256u32;
30086    const NAME: &'static str = "SETUP_SIGNING";
30087    const EXTRA_CRC: u8 = 71u8;
30088    const ENCODED_LEN: usize = 42usize;
30089    fn deser(
30090        _version: MavlinkVersion,
30091        __input: &[u8],
30092    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30093        let avail_len = __input.len();
30094        let mut payload_buf = [0; Self::ENCODED_LEN];
30095        let mut buf = if avail_len < Self::ENCODED_LEN {
30096            payload_buf[0..avail_len].copy_from_slice(__input);
30097            Bytes::new(&payload_buf)
30098        } else {
30099            Bytes::new(__input)
30100        };
30101        let mut __struct = Self::default();
30102        __struct.initial_timestamp = buf.get_u64_le()?;
30103        __struct.target_system = buf.get_u8()?;
30104        __struct.target_component = buf.get_u8()?;
30105        for v in &mut __struct.secret_key {
30106            let val = buf.get_u8()?;
30107            *v = val;
30108        }
30109        Ok(__struct)
30110    }
30111    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30112        let mut __tmp = BytesMut::new(bytes);
30113        #[allow(clippy::absurd_extreme_comparisons)]
30114        #[allow(unused_comparisons)]
30115        if __tmp.remaining() < Self::ENCODED_LEN {
30116            panic!(
30117                "buffer is too small (need {} bytes, but got {})",
30118                Self::ENCODED_LEN,
30119                __tmp.remaining(),
30120            )
30121        }
30122        __tmp.put_u64_le(self.initial_timestamp);
30123        __tmp.put_u8(self.target_system);
30124        __tmp.put_u8(self.target_component);
30125        for val in &self.secret_key {
30126            __tmp.put_u8(*val);
30127        }
30128        if matches!(version, MavlinkVersion::V2) {
30129            let len = __tmp.len();
30130            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30131        } else {
30132            __tmp.len()
30133        }
30134    }
30135}
30136#[doc = "Set the vehicle attitude and body angular rates."]
30137#[doc = ""]
30138#[doc = "ID: 139"]
30139#[derive(Debug, Clone, PartialEq)]
30140#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30141#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30142#[cfg_attr(feature = "ts", derive(TS))]
30143#[cfg_attr(feature = "ts", ts(export))]
30144pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
30145    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30146    pub time_usec: u64,
30147    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
30148    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30149    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30150    pub controls: [f32; 8],
30151    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
30152    pub group_mlx: u8,
30153    #[doc = "System ID"]
30154    pub target_system: u8,
30155    #[doc = "Component ID"]
30156    pub target_component: u8,
30157}
30158impl SET_ACTUATOR_CONTROL_TARGET_DATA {
30159    pub const ENCODED_LEN: usize = 43usize;
30160    pub const DEFAULT: Self = Self {
30161        time_usec: 0_u64,
30162        controls: [0.0_f32; 8usize],
30163        group_mlx: 0_u8,
30164        target_system: 0_u8,
30165        target_component: 0_u8,
30166    };
30167    #[cfg(feature = "arbitrary")]
30168    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30169        use arbitrary::{Arbitrary, Unstructured};
30170        let mut buf = [0u8; 1024];
30171        rng.fill_bytes(&mut buf);
30172        let mut unstructured = Unstructured::new(&buf);
30173        Self::arbitrary(&mut unstructured).unwrap_or_default()
30174    }
30175}
30176impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
30177    fn default() -> Self {
30178        Self::DEFAULT.clone()
30179    }
30180}
30181impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
30182    type Message = MavMessage;
30183    const ID: u32 = 139u32;
30184    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
30185    const EXTRA_CRC: u8 = 168u8;
30186    const ENCODED_LEN: usize = 43usize;
30187    fn deser(
30188        _version: MavlinkVersion,
30189        __input: &[u8],
30190    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30191        let avail_len = __input.len();
30192        let mut payload_buf = [0; Self::ENCODED_LEN];
30193        let mut buf = if avail_len < Self::ENCODED_LEN {
30194            payload_buf[0..avail_len].copy_from_slice(__input);
30195            Bytes::new(&payload_buf)
30196        } else {
30197            Bytes::new(__input)
30198        };
30199        let mut __struct = Self::default();
30200        __struct.time_usec = buf.get_u64_le()?;
30201        for v in &mut __struct.controls {
30202            let val = buf.get_f32_le()?;
30203            *v = val;
30204        }
30205        __struct.group_mlx = buf.get_u8()?;
30206        __struct.target_system = buf.get_u8()?;
30207        __struct.target_component = buf.get_u8()?;
30208        Ok(__struct)
30209    }
30210    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30211        let mut __tmp = BytesMut::new(bytes);
30212        #[allow(clippy::absurd_extreme_comparisons)]
30213        #[allow(unused_comparisons)]
30214        if __tmp.remaining() < Self::ENCODED_LEN {
30215            panic!(
30216                "buffer is too small (need {} bytes, but got {})",
30217                Self::ENCODED_LEN,
30218                __tmp.remaining(),
30219            )
30220        }
30221        __tmp.put_u64_le(self.time_usec);
30222        for val in &self.controls {
30223            __tmp.put_f32_le(*val);
30224        }
30225        __tmp.put_u8(self.group_mlx);
30226        __tmp.put_u8(self.target_system);
30227        __tmp.put_u8(self.target_component);
30228        if matches!(version, MavlinkVersion::V2) {
30229            let len = __tmp.len();
30230            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30231        } else {
30232            __tmp.len()
30233        }
30234    }
30235}
30236#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
30237#[doc = ""]
30238#[doc = "ID: 82"]
30239#[derive(Debug, Clone, PartialEq)]
30240#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30241#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30242#[cfg_attr(feature = "ts", derive(TS))]
30243#[cfg_attr(feature = "ts", ts(export))]
30244pub struct SET_ATTITUDE_TARGET_DATA {
30245    #[doc = "Timestamp (time since system boot)."]
30246    pub time_boot_ms: u32,
30247    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
30248    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30249    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30250    pub q: [f32; 4],
30251    #[doc = "Body roll rate"]
30252    pub body_roll_rate: f32,
30253    #[doc = "Body pitch rate"]
30254    pub body_pitch_rate: f32,
30255    #[doc = "Body yaw rate"]
30256    pub body_yaw_rate: f32,
30257    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
30258    pub thrust: f32,
30259    #[doc = "System ID"]
30260    pub target_system: u8,
30261    #[doc = "Component ID"]
30262    pub target_component: u8,
30263    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
30264    pub type_mask: AttitudeTargetTypemask,
30265    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
30266    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30267    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30268    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30269    pub thrust_body: [f32; 3],
30270}
30271impl SET_ATTITUDE_TARGET_DATA {
30272    pub const ENCODED_LEN: usize = 51usize;
30273    pub const DEFAULT: Self = Self {
30274        time_boot_ms: 0_u32,
30275        q: [0.0_f32; 4usize],
30276        body_roll_rate: 0.0_f32,
30277        body_pitch_rate: 0.0_f32,
30278        body_yaw_rate: 0.0_f32,
30279        thrust: 0.0_f32,
30280        target_system: 0_u8,
30281        target_component: 0_u8,
30282        type_mask: AttitudeTargetTypemask::DEFAULT,
30283        thrust_body: [0.0_f32; 3usize],
30284    };
30285    #[cfg(feature = "arbitrary")]
30286    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30287        use arbitrary::{Arbitrary, Unstructured};
30288        let mut buf = [0u8; 1024];
30289        rng.fill_bytes(&mut buf);
30290        let mut unstructured = Unstructured::new(&buf);
30291        Self::arbitrary(&mut unstructured).unwrap_or_default()
30292    }
30293}
30294impl Default for SET_ATTITUDE_TARGET_DATA {
30295    fn default() -> Self {
30296        Self::DEFAULT.clone()
30297    }
30298}
30299impl MessageData for SET_ATTITUDE_TARGET_DATA {
30300    type Message = MavMessage;
30301    const ID: u32 = 82u32;
30302    const NAME: &'static str = "SET_ATTITUDE_TARGET";
30303    const EXTRA_CRC: u8 = 49u8;
30304    const ENCODED_LEN: usize = 51usize;
30305    fn deser(
30306        _version: MavlinkVersion,
30307        __input: &[u8],
30308    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30309        let avail_len = __input.len();
30310        let mut payload_buf = [0; Self::ENCODED_LEN];
30311        let mut buf = if avail_len < Self::ENCODED_LEN {
30312            payload_buf[0..avail_len].copy_from_slice(__input);
30313            Bytes::new(&payload_buf)
30314        } else {
30315            Bytes::new(__input)
30316        };
30317        let mut __struct = Self::default();
30318        __struct.time_boot_ms = buf.get_u32_le()?;
30319        for v in &mut __struct.q {
30320            let val = buf.get_f32_le()?;
30321            *v = val;
30322        }
30323        __struct.body_roll_rate = buf.get_f32_le()?;
30324        __struct.body_pitch_rate = buf.get_f32_le()?;
30325        __struct.body_yaw_rate = buf.get_f32_le()?;
30326        __struct.thrust = buf.get_f32_le()?;
30327        __struct.target_system = buf.get_u8()?;
30328        __struct.target_component = buf.get_u8()?;
30329        let tmp = buf.get_u8()?;
30330        __struct.type_mask =
30331            AttitudeTargetTypemask::from_bits(tmp as <AttitudeTargetTypemask as Flags>::Bits)
30332                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30333                    flag_type: "AttitudeTargetTypemask",
30334                    value: tmp as u64,
30335                })?;
30336        for v in &mut __struct.thrust_body {
30337            let val = buf.get_f32_le()?;
30338            *v = val;
30339        }
30340        Ok(__struct)
30341    }
30342    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30343        let mut __tmp = BytesMut::new(bytes);
30344        #[allow(clippy::absurd_extreme_comparisons)]
30345        #[allow(unused_comparisons)]
30346        if __tmp.remaining() < Self::ENCODED_LEN {
30347            panic!(
30348                "buffer is too small (need {} bytes, but got {})",
30349                Self::ENCODED_LEN,
30350                __tmp.remaining(),
30351            )
30352        }
30353        __tmp.put_u32_le(self.time_boot_ms);
30354        for val in &self.q {
30355            __tmp.put_f32_le(*val);
30356        }
30357        __tmp.put_f32_le(self.body_roll_rate);
30358        __tmp.put_f32_le(self.body_pitch_rate);
30359        __tmp.put_f32_le(self.body_yaw_rate);
30360        __tmp.put_f32_le(self.thrust);
30361        __tmp.put_u8(self.target_system);
30362        __tmp.put_u8(self.target_component);
30363        __tmp.put_u8(self.type_mask.bits() as u8);
30364        if matches!(version, MavlinkVersion::V2) {
30365            for val in &self.thrust_body {
30366                __tmp.put_f32_le(*val);
30367            }
30368            let len = __tmp.len();
30369            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30370        } else {
30371            __tmp.len()
30372        }
30373    }
30374}
30375#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
30376#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
30377#[doc = ""]
30378#[doc = "ID: 48"]
30379#[derive(Debug, Clone, PartialEq)]
30380#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30381#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30382#[cfg_attr(feature = "ts", derive(TS))]
30383#[cfg_attr(feature = "ts", ts(export))]
30384pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
30385    #[doc = "Latitude (WGS84)"]
30386    pub latitude: i32,
30387    #[doc = "Longitude (WGS84)"]
30388    pub longitude: i32,
30389    #[doc = "Altitude (MSL). Positive for up."]
30390    pub altitude: i32,
30391    #[doc = "System ID"]
30392    pub target_system: u8,
30393    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30394    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30395    pub time_usec: u64,
30396}
30397impl SET_GPS_GLOBAL_ORIGIN_DATA {
30398    pub const ENCODED_LEN: usize = 21usize;
30399    pub const DEFAULT: Self = Self {
30400        latitude: 0_i32,
30401        longitude: 0_i32,
30402        altitude: 0_i32,
30403        target_system: 0_u8,
30404        time_usec: 0_u64,
30405    };
30406    #[cfg(feature = "arbitrary")]
30407    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30408        use arbitrary::{Arbitrary, Unstructured};
30409        let mut buf = [0u8; 1024];
30410        rng.fill_bytes(&mut buf);
30411        let mut unstructured = Unstructured::new(&buf);
30412        Self::arbitrary(&mut unstructured).unwrap_or_default()
30413    }
30414}
30415impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
30416    fn default() -> Self {
30417        Self::DEFAULT.clone()
30418    }
30419}
30420impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
30421    type Message = MavMessage;
30422    const ID: u32 = 48u32;
30423    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
30424    const EXTRA_CRC: u8 = 41u8;
30425    const ENCODED_LEN: usize = 21usize;
30426    fn deser(
30427        _version: MavlinkVersion,
30428        __input: &[u8],
30429    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30430        let avail_len = __input.len();
30431        let mut payload_buf = [0; Self::ENCODED_LEN];
30432        let mut buf = if avail_len < Self::ENCODED_LEN {
30433            payload_buf[0..avail_len].copy_from_slice(__input);
30434            Bytes::new(&payload_buf)
30435        } else {
30436            Bytes::new(__input)
30437        };
30438        let mut __struct = Self::default();
30439        __struct.latitude = buf.get_i32_le()?;
30440        __struct.longitude = buf.get_i32_le()?;
30441        __struct.altitude = buf.get_i32_le()?;
30442        __struct.target_system = buf.get_u8()?;
30443        __struct.time_usec = buf.get_u64_le()?;
30444        Ok(__struct)
30445    }
30446    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30447        let mut __tmp = BytesMut::new(bytes);
30448        #[allow(clippy::absurd_extreme_comparisons)]
30449        #[allow(unused_comparisons)]
30450        if __tmp.remaining() < Self::ENCODED_LEN {
30451            panic!(
30452                "buffer is too small (need {} bytes, but got {})",
30453                Self::ENCODED_LEN,
30454                __tmp.remaining(),
30455            )
30456        }
30457        __tmp.put_i32_le(self.latitude);
30458        __tmp.put_i32_le(self.longitude);
30459        __tmp.put_i32_le(self.altitude);
30460        __tmp.put_u8(self.target_system);
30461        if matches!(version, MavlinkVersion::V2) {
30462            __tmp.put_u64_le(self.time_usec);
30463            let len = __tmp.len();
30464            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30465        } else {
30466            __tmp.len()
30467        }
30468    }
30469}
30470#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
30471#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
30472#[doc = ""]
30473#[doc = "ID: 243"]
30474#[derive(Debug, Clone, PartialEq)]
30475#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30476#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30477#[cfg_attr(feature = "ts", derive(TS))]
30478#[cfg_attr(feature = "ts", ts(export))]
30479pub struct SET_HOME_POSITION_DATA {
30480    #[doc = "Latitude (WGS84)"]
30481    pub latitude: i32,
30482    #[doc = "Longitude (WGS84)"]
30483    pub longitude: i32,
30484    #[doc = "Altitude (MSL). Positive for up."]
30485    pub altitude: i32,
30486    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
30487    pub x: f32,
30488    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
30489    pub y: f32,
30490    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
30491    pub z: f32,
30492    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
30493    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30494    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30495    pub q: [f32; 4],
30496    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
30497    pub approach_x: f32,
30498    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
30499    pub approach_y: f32,
30500    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
30501    pub approach_z: f32,
30502    #[doc = "System ID."]
30503    pub target_system: u8,
30504    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30505    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30506    pub time_usec: u64,
30507}
30508impl SET_HOME_POSITION_DATA {
30509    pub const ENCODED_LEN: usize = 61usize;
30510    pub const DEFAULT: Self = Self {
30511        latitude: 0_i32,
30512        longitude: 0_i32,
30513        altitude: 0_i32,
30514        x: 0.0_f32,
30515        y: 0.0_f32,
30516        z: 0.0_f32,
30517        q: [0.0_f32; 4usize],
30518        approach_x: 0.0_f32,
30519        approach_y: 0.0_f32,
30520        approach_z: 0.0_f32,
30521        target_system: 0_u8,
30522        time_usec: 0_u64,
30523    };
30524    #[cfg(feature = "arbitrary")]
30525    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30526        use arbitrary::{Arbitrary, Unstructured};
30527        let mut buf = [0u8; 1024];
30528        rng.fill_bytes(&mut buf);
30529        let mut unstructured = Unstructured::new(&buf);
30530        Self::arbitrary(&mut unstructured).unwrap_or_default()
30531    }
30532}
30533impl Default for SET_HOME_POSITION_DATA {
30534    fn default() -> Self {
30535        Self::DEFAULT.clone()
30536    }
30537}
30538impl MessageData for SET_HOME_POSITION_DATA {
30539    type Message = MavMessage;
30540    const ID: u32 = 243u32;
30541    const NAME: &'static str = "SET_HOME_POSITION";
30542    const EXTRA_CRC: u8 = 85u8;
30543    const ENCODED_LEN: usize = 61usize;
30544    fn deser(
30545        _version: MavlinkVersion,
30546        __input: &[u8],
30547    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30548        let avail_len = __input.len();
30549        let mut payload_buf = [0; Self::ENCODED_LEN];
30550        let mut buf = if avail_len < Self::ENCODED_LEN {
30551            payload_buf[0..avail_len].copy_from_slice(__input);
30552            Bytes::new(&payload_buf)
30553        } else {
30554            Bytes::new(__input)
30555        };
30556        let mut __struct = Self::default();
30557        __struct.latitude = buf.get_i32_le()?;
30558        __struct.longitude = buf.get_i32_le()?;
30559        __struct.altitude = buf.get_i32_le()?;
30560        __struct.x = buf.get_f32_le()?;
30561        __struct.y = buf.get_f32_le()?;
30562        __struct.z = buf.get_f32_le()?;
30563        for v in &mut __struct.q {
30564            let val = buf.get_f32_le()?;
30565            *v = val;
30566        }
30567        __struct.approach_x = buf.get_f32_le()?;
30568        __struct.approach_y = buf.get_f32_le()?;
30569        __struct.approach_z = buf.get_f32_le()?;
30570        __struct.target_system = buf.get_u8()?;
30571        __struct.time_usec = buf.get_u64_le()?;
30572        Ok(__struct)
30573    }
30574    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30575        let mut __tmp = BytesMut::new(bytes);
30576        #[allow(clippy::absurd_extreme_comparisons)]
30577        #[allow(unused_comparisons)]
30578        if __tmp.remaining() < Self::ENCODED_LEN {
30579            panic!(
30580                "buffer is too small (need {} bytes, but got {})",
30581                Self::ENCODED_LEN,
30582                __tmp.remaining(),
30583            )
30584        }
30585        __tmp.put_i32_le(self.latitude);
30586        __tmp.put_i32_le(self.longitude);
30587        __tmp.put_i32_le(self.altitude);
30588        __tmp.put_f32_le(self.x);
30589        __tmp.put_f32_le(self.y);
30590        __tmp.put_f32_le(self.z);
30591        for val in &self.q {
30592            __tmp.put_f32_le(*val);
30593        }
30594        __tmp.put_f32_le(self.approach_x);
30595        __tmp.put_f32_le(self.approach_y);
30596        __tmp.put_f32_le(self.approach_z);
30597        __tmp.put_u8(self.target_system);
30598        if matches!(version, MavlinkVersion::V2) {
30599            __tmp.put_u64_le(self.time_usec);
30600            let len = __tmp.len();
30601            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30602        } else {
30603            __tmp.len()
30604        }
30605    }
30606}
30607#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
30608#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
30609#[doc = ""]
30610#[doc = "ID: 11"]
30611#[derive(Debug, Clone, PartialEq)]
30612#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30613#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30614#[cfg_attr(feature = "ts", derive(TS))]
30615#[cfg_attr(feature = "ts", ts(export))]
30616pub struct SET_MODE_DATA {
30617    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
30618    pub custom_mode: u32,
30619    #[doc = "The system setting the mode"]
30620    pub target_system: u8,
30621    #[doc = "The new base mode."]
30622    pub base_mode: MavMode,
30623}
30624impl SET_MODE_DATA {
30625    pub const ENCODED_LEN: usize = 6usize;
30626    pub const DEFAULT: Self = Self {
30627        custom_mode: 0_u32,
30628        target_system: 0_u8,
30629        base_mode: MavMode::DEFAULT,
30630    };
30631    #[cfg(feature = "arbitrary")]
30632    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30633        use arbitrary::{Arbitrary, Unstructured};
30634        let mut buf = [0u8; 1024];
30635        rng.fill_bytes(&mut buf);
30636        let mut unstructured = Unstructured::new(&buf);
30637        Self::arbitrary(&mut unstructured).unwrap_or_default()
30638    }
30639}
30640impl Default for SET_MODE_DATA {
30641    fn default() -> Self {
30642        Self::DEFAULT.clone()
30643    }
30644}
30645impl MessageData for SET_MODE_DATA {
30646    type Message = MavMessage;
30647    const ID: u32 = 11u32;
30648    const NAME: &'static str = "SET_MODE";
30649    const EXTRA_CRC: u8 = 89u8;
30650    const ENCODED_LEN: usize = 6usize;
30651    fn deser(
30652        _version: MavlinkVersion,
30653        __input: &[u8],
30654    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30655        let avail_len = __input.len();
30656        let mut payload_buf = [0; Self::ENCODED_LEN];
30657        let mut buf = if avail_len < Self::ENCODED_LEN {
30658            payload_buf[0..avail_len].copy_from_slice(__input);
30659            Bytes::new(&payload_buf)
30660        } else {
30661            Bytes::new(__input)
30662        };
30663        let mut __struct = Self::default();
30664        __struct.custom_mode = buf.get_u32_le()?;
30665        __struct.target_system = buf.get_u8()?;
30666        let tmp = buf.get_u8()?;
30667        __struct.base_mode =
30668            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30669                enum_type: "MavMode",
30670                value: tmp as u64,
30671            })?;
30672        Ok(__struct)
30673    }
30674    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30675        let mut __tmp = BytesMut::new(bytes);
30676        #[allow(clippy::absurd_extreme_comparisons)]
30677        #[allow(unused_comparisons)]
30678        if __tmp.remaining() < Self::ENCODED_LEN {
30679            panic!(
30680                "buffer is too small (need {} bytes, but got {})",
30681                Self::ENCODED_LEN,
30682                __tmp.remaining(),
30683            )
30684        }
30685        __tmp.put_u32_le(self.custom_mode);
30686        __tmp.put_u8(self.target_system);
30687        __tmp.put_u8(self.base_mode as u8);
30688        if matches!(version, MavlinkVersion::V2) {
30689            let len = __tmp.len();
30690            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30691        } else {
30692            __tmp.len()
30693        }
30694    }
30695}
30696#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
30697#[doc = ""]
30698#[doc = "ID: 86"]
30699#[derive(Debug, Clone, PartialEq)]
30700#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30701#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30702#[cfg_attr(feature = "ts", derive(TS))]
30703#[cfg_attr(feature = "ts", ts(export))]
30704pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
30705    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
30706    pub time_boot_ms: u32,
30707    #[doc = "Latitude in WGS84 frame"]
30708    pub lat_int: i32,
30709    #[doc = "Longitude in WGS84 frame"]
30710    pub lon_int: i32,
30711    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
30712    pub alt: f32,
30713    #[doc = "X velocity in NED frame"]
30714    pub vx: f32,
30715    #[doc = "Y velocity in NED frame"]
30716    pub vy: f32,
30717    #[doc = "Z velocity in NED frame"]
30718    pub vz: f32,
30719    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30720    pub afx: f32,
30721    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30722    pub afy: f32,
30723    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30724    pub afz: f32,
30725    #[doc = "yaw setpoint"]
30726    pub yaw: f32,
30727    #[doc = "yaw rate setpoint"]
30728    pub yaw_rate: f32,
30729    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
30730    pub type_mask: PositionTargetTypemask,
30731    #[doc = "System ID"]
30732    pub target_system: u8,
30733    #[doc = "Component ID"]
30734    pub target_component: u8,
30735    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
30736    pub coordinate_frame: MavFrame,
30737}
30738impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
30739    pub const ENCODED_LEN: usize = 53usize;
30740    pub const DEFAULT: Self = Self {
30741        time_boot_ms: 0_u32,
30742        lat_int: 0_i32,
30743        lon_int: 0_i32,
30744        alt: 0.0_f32,
30745        vx: 0.0_f32,
30746        vy: 0.0_f32,
30747        vz: 0.0_f32,
30748        afx: 0.0_f32,
30749        afy: 0.0_f32,
30750        afz: 0.0_f32,
30751        yaw: 0.0_f32,
30752        yaw_rate: 0.0_f32,
30753        type_mask: PositionTargetTypemask::DEFAULT,
30754        target_system: 0_u8,
30755        target_component: 0_u8,
30756        coordinate_frame: MavFrame::DEFAULT,
30757    };
30758    #[cfg(feature = "arbitrary")]
30759    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30760        use arbitrary::{Arbitrary, Unstructured};
30761        let mut buf = [0u8; 1024];
30762        rng.fill_bytes(&mut buf);
30763        let mut unstructured = Unstructured::new(&buf);
30764        Self::arbitrary(&mut unstructured).unwrap_or_default()
30765    }
30766}
30767impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
30768    fn default() -> Self {
30769        Self::DEFAULT.clone()
30770    }
30771}
30772impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
30773    type Message = MavMessage;
30774    const ID: u32 = 86u32;
30775    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
30776    const EXTRA_CRC: u8 = 5u8;
30777    const ENCODED_LEN: usize = 53usize;
30778    fn deser(
30779        _version: MavlinkVersion,
30780        __input: &[u8],
30781    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30782        let avail_len = __input.len();
30783        let mut payload_buf = [0; Self::ENCODED_LEN];
30784        let mut buf = if avail_len < Self::ENCODED_LEN {
30785            payload_buf[0..avail_len].copy_from_slice(__input);
30786            Bytes::new(&payload_buf)
30787        } else {
30788            Bytes::new(__input)
30789        };
30790        let mut __struct = Self::default();
30791        __struct.time_boot_ms = buf.get_u32_le()?;
30792        __struct.lat_int = buf.get_i32_le()?;
30793        __struct.lon_int = buf.get_i32_le()?;
30794        __struct.alt = buf.get_f32_le()?;
30795        __struct.vx = buf.get_f32_le()?;
30796        __struct.vy = buf.get_f32_le()?;
30797        __struct.vz = buf.get_f32_le()?;
30798        __struct.afx = buf.get_f32_le()?;
30799        __struct.afy = buf.get_f32_le()?;
30800        __struct.afz = buf.get_f32_le()?;
30801        __struct.yaw = buf.get_f32_le()?;
30802        __struct.yaw_rate = buf.get_f32_le()?;
30803        let tmp = buf.get_u16_le()?;
30804        __struct.type_mask =
30805            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
30806                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30807                    flag_type: "PositionTargetTypemask",
30808                    value: tmp as u64,
30809                })?;
30810        __struct.target_system = buf.get_u8()?;
30811        __struct.target_component = buf.get_u8()?;
30812        let tmp = buf.get_u8()?;
30813        __struct.coordinate_frame =
30814            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30815                enum_type: "MavFrame",
30816                value: tmp as u64,
30817            })?;
30818        Ok(__struct)
30819    }
30820    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30821        let mut __tmp = BytesMut::new(bytes);
30822        #[allow(clippy::absurd_extreme_comparisons)]
30823        #[allow(unused_comparisons)]
30824        if __tmp.remaining() < Self::ENCODED_LEN {
30825            panic!(
30826                "buffer is too small (need {} bytes, but got {})",
30827                Self::ENCODED_LEN,
30828                __tmp.remaining(),
30829            )
30830        }
30831        __tmp.put_u32_le(self.time_boot_ms);
30832        __tmp.put_i32_le(self.lat_int);
30833        __tmp.put_i32_le(self.lon_int);
30834        __tmp.put_f32_le(self.alt);
30835        __tmp.put_f32_le(self.vx);
30836        __tmp.put_f32_le(self.vy);
30837        __tmp.put_f32_le(self.vz);
30838        __tmp.put_f32_le(self.afx);
30839        __tmp.put_f32_le(self.afy);
30840        __tmp.put_f32_le(self.afz);
30841        __tmp.put_f32_le(self.yaw);
30842        __tmp.put_f32_le(self.yaw_rate);
30843        __tmp.put_u16_le(self.type_mask.bits() as u16);
30844        __tmp.put_u8(self.target_system);
30845        __tmp.put_u8(self.target_component);
30846        __tmp.put_u8(self.coordinate_frame as u8);
30847        if matches!(version, MavlinkVersion::V2) {
30848            let len = __tmp.len();
30849            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30850        } else {
30851            __tmp.len()
30852        }
30853    }
30854}
30855#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
30856#[doc = ""]
30857#[doc = "ID: 84"]
30858#[derive(Debug, Clone, PartialEq)]
30859#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30860#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30861#[cfg_attr(feature = "ts", derive(TS))]
30862#[cfg_attr(feature = "ts", ts(export))]
30863pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
30864    #[doc = "Timestamp (time since system boot)."]
30865    pub time_boot_ms: u32,
30866    #[doc = "X Position in NED frame"]
30867    pub x: f32,
30868    #[doc = "Y Position in NED frame"]
30869    pub y: f32,
30870    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
30871    pub z: f32,
30872    #[doc = "X velocity in NED frame"]
30873    pub vx: f32,
30874    #[doc = "Y velocity in NED frame"]
30875    pub vy: f32,
30876    #[doc = "Z velocity in NED frame"]
30877    pub vz: f32,
30878    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30879    pub afx: f32,
30880    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30881    pub afy: f32,
30882    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30883    pub afz: f32,
30884    #[doc = "yaw setpoint"]
30885    pub yaw: f32,
30886    #[doc = "yaw rate setpoint"]
30887    pub yaw_rate: f32,
30888    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
30889    pub type_mask: PositionTargetTypemask,
30890    #[doc = "System ID"]
30891    pub target_system: u8,
30892    #[doc = "Component ID"]
30893    pub target_component: u8,
30894    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
30895    pub coordinate_frame: MavFrame,
30896}
30897impl SET_POSITION_TARGET_LOCAL_NED_DATA {
30898    pub const ENCODED_LEN: usize = 53usize;
30899    pub const DEFAULT: Self = Self {
30900        time_boot_ms: 0_u32,
30901        x: 0.0_f32,
30902        y: 0.0_f32,
30903        z: 0.0_f32,
30904        vx: 0.0_f32,
30905        vy: 0.0_f32,
30906        vz: 0.0_f32,
30907        afx: 0.0_f32,
30908        afy: 0.0_f32,
30909        afz: 0.0_f32,
30910        yaw: 0.0_f32,
30911        yaw_rate: 0.0_f32,
30912        type_mask: PositionTargetTypemask::DEFAULT,
30913        target_system: 0_u8,
30914        target_component: 0_u8,
30915        coordinate_frame: MavFrame::DEFAULT,
30916    };
30917    #[cfg(feature = "arbitrary")]
30918    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30919        use arbitrary::{Arbitrary, Unstructured};
30920        let mut buf = [0u8; 1024];
30921        rng.fill_bytes(&mut buf);
30922        let mut unstructured = Unstructured::new(&buf);
30923        Self::arbitrary(&mut unstructured).unwrap_or_default()
30924    }
30925}
30926impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
30927    fn default() -> Self {
30928        Self::DEFAULT.clone()
30929    }
30930}
30931impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
30932    type Message = MavMessage;
30933    const ID: u32 = 84u32;
30934    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
30935    const EXTRA_CRC: u8 = 143u8;
30936    const ENCODED_LEN: usize = 53usize;
30937    fn deser(
30938        _version: MavlinkVersion,
30939        __input: &[u8],
30940    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30941        let avail_len = __input.len();
30942        let mut payload_buf = [0; Self::ENCODED_LEN];
30943        let mut buf = if avail_len < Self::ENCODED_LEN {
30944            payload_buf[0..avail_len].copy_from_slice(__input);
30945            Bytes::new(&payload_buf)
30946        } else {
30947            Bytes::new(__input)
30948        };
30949        let mut __struct = Self::default();
30950        __struct.time_boot_ms = buf.get_u32_le()?;
30951        __struct.x = buf.get_f32_le()?;
30952        __struct.y = buf.get_f32_le()?;
30953        __struct.z = buf.get_f32_le()?;
30954        __struct.vx = buf.get_f32_le()?;
30955        __struct.vy = buf.get_f32_le()?;
30956        __struct.vz = buf.get_f32_le()?;
30957        __struct.afx = buf.get_f32_le()?;
30958        __struct.afy = buf.get_f32_le()?;
30959        __struct.afz = buf.get_f32_le()?;
30960        __struct.yaw = buf.get_f32_le()?;
30961        __struct.yaw_rate = buf.get_f32_le()?;
30962        let tmp = buf.get_u16_le()?;
30963        __struct.type_mask =
30964            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
30965                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30966                    flag_type: "PositionTargetTypemask",
30967                    value: tmp as u64,
30968                })?;
30969        __struct.target_system = buf.get_u8()?;
30970        __struct.target_component = buf.get_u8()?;
30971        let tmp = buf.get_u8()?;
30972        __struct.coordinate_frame =
30973            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30974                enum_type: "MavFrame",
30975                value: tmp as u64,
30976            })?;
30977        Ok(__struct)
30978    }
30979    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30980        let mut __tmp = BytesMut::new(bytes);
30981        #[allow(clippy::absurd_extreme_comparisons)]
30982        #[allow(unused_comparisons)]
30983        if __tmp.remaining() < Self::ENCODED_LEN {
30984            panic!(
30985                "buffer is too small (need {} bytes, but got {})",
30986                Self::ENCODED_LEN,
30987                __tmp.remaining(),
30988            )
30989        }
30990        __tmp.put_u32_le(self.time_boot_ms);
30991        __tmp.put_f32_le(self.x);
30992        __tmp.put_f32_le(self.y);
30993        __tmp.put_f32_le(self.z);
30994        __tmp.put_f32_le(self.vx);
30995        __tmp.put_f32_le(self.vy);
30996        __tmp.put_f32_le(self.vz);
30997        __tmp.put_f32_le(self.afx);
30998        __tmp.put_f32_le(self.afy);
30999        __tmp.put_f32_le(self.afz);
31000        __tmp.put_f32_le(self.yaw);
31001        __tmp.put_f32_le(self.yaw_rate);
31002        __tmp.put_u16_le(self.type_mask.bits() as u16);
31003        __tmp.put_u8(self.target_system);
31004        __tmp.put_u8(self.target_component);
31005        __tmp.put_u8(self.coordinate_frame as u8);
31006        if matches!(version, MavlinkVersion::V2) {
31007            let len = __tmp.len();
31008            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31009        } else {
31010            __tmp.len()
31011        }
31012    }
31013}
31014#[doc = "Status of simulation environment, if used."]
31015#[doc = ""]
31016#[doc = "ID: 108"]
31017#[derive(Debug, Clone, PartialEq)]
31018#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31019#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31020#[cfg_attr(feature = "ts", derive(TS))]
31021#[cfg_attr(feature = "ts", ts(export))]
31022pub struct SIM_STATE_DATA {
31023    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
31024    pub q1: f32,
31025    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
31026    pub q2: f32,
31027    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
31028    pub q3: f32,
31029    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
31030    pub q4: f32,
31031    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
31032    pub roll: f32,
31033    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
31034    pub pitch: f32,
31035    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
31036    pub yaw: f32,
31037    #[doc = "X acceleration"]
31038    pub xacc: f32,
31039    #[doc = "Y acceleration"]
31040    pub yacc: f32,
31041    #[doc = "Z acceleration"]
31042    pub zacc: f32,
31043    #[doc = "Angular speed around X axis"]
31044    pub xgyro: f32,
31045    #[doc = "Angular speed around Y axis"]
31046    pub ygyro: f32,
31047    #[doc = "Angular speed around Z axis"]
31048    pub zgyro: f32,
31049    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
31050    pub lat: f32,
31051    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
31052    pub lon: f32,
31053    #[doc = "Altitude"]
31054    pub alt: f32,
31055    #[doc = "Horizontal position standard deviation"]
31056    pub std_dev_horz: f32,
31057    #[doc = "Vertical position standard deviation"]
31058    pub std_dev_vert: f32,
31059    #[doc = "True velocity in north direction in earth-fixed NED frame"]
31060    pub vn: f32,
31061    #[doc = "True velocity in east direction in earth-fixed NED frame"]
31062    pub ve: f32,
31063    #[doc = "True velocity in down direction in earth-fixed NED frame"]
31064    pub vd: f32,
31065    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
31066    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31067    pub lat_int: i32,
31068    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
31069    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31070    pub lon_int: i32,
31071}
31072impl SIM_STATE_DATA {
31073    pub const ENCODED_LEN: usize = 92usize;
31074    pub const DEFAULT: Self = Self {
31075        q1: 0.0_f32,
31076        q2: 0.0_f32,
31077        q3: 0.0_f32,
31078        q4: 0.0_f32,
31079        roll: 0.0_f32,
31080        pitch: 0.0_f32,
31081        yaw: 0.0_f32,
31082        xacc: 0.0_f32,
31083        yacc: 0.0_f32,
31084        zacc: 0.0_f32,
31085        xgyro: 0.0_f32,
31086        ygyro: 0.0_f32,
31087        zgyro: 0.0_f32,
31088        lat: 0.0_f32,
31089        lon: 0.0_f32,
31090        alt: 0.0_f32,
31091        std_dev_horz: 0.0_f32,
31092        std_dev_vert: 0.0_f32,
31093        vn: 0.0_f32,
31094        ve: 0.0_f32,
31095        vd: 0.0_f32,
31096        lat_int: 0_i32,
31097        lon_int: 0_i32,
31098    };
31099    #[cfg(feature = "arbitrary")]
31100    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31101        use arbitrary::{Arbitrary, Unstructured};
31102        let mut buf = [0u8; 1024];
31103        rng.fill_bytes(&mut buf);
31104        let mut unstructured = Unstructured::new(&buf);
31105        Self::arbitrary(&mut unstructured).unwrap_or_default()
31106    }
31107}
31108impl Default for SIM_STATE_DATA {
31109    fn default() -> Self {
31110        Self::DEFAULT.clone()
31111    }
31112}
31113impl MessageData for SIM_STATE_DATA {
31114    type Message = MavMessage;
31115    const ID: u32 = 108u32;
31116    const NAME: &'static str = "SIM_STATE";
31117    const EXTRA_CRC: u8 = 32u8;
31118    const ENCODED_LEN: usize = 92usize;
31119    fn deser(
31120        _version: MavlinkVersion,
31121        __input: &[u8],
31122    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31123        let avail_len = __input.len();
31124        let mut payload_buf = [0; Self::ENCODED_LEN];
31125        let mut buf = if avail_len < Self::ENCODED_LEN {
31126            payload_buf[0..avail_len].copy_from_slice(__input);
31127            Bytes::new(&payload_buf)
31128        } else {
31129            Bytes::new(__input)
31130        };
31131        let mut __struct = Self::default();
31132        __struct.q1 = buf.get_f32_le()?;
31133        __struct.q2 = buf.get_f32_le()?;
31134        __struct.q3 = buf.get_f32_le()?;
31135        __struct.q4 = buf.get_f32_le()?;
31136        __struct.roll = buf.get_f32_le()?;
31137        __struct.pitch = buf.get_f32_le()?;
31138        __struct.yaw = buf.get_f32_le()?;
31139        __struct.xacc = buf.get_f32_le()?;
31140        __struct.yacc = buf.get_f32_le()?;
31141        __struct.zacc = buf.get_f32_le()?;
31142        __struct.xgyro = buf.get_f32_le()?;
31143        __struct.ygyro = buf.get_f32_le()?;
31144        __struct.zgyro = buf.get_f32_le()?;
31145        __struct.lat = buf.get_f32_le()?;
31146        __struct.lon = buf.get_f32_le()?;
31147        __struct.alt = buf.get_f32_le()?;
31148        __struct.std_dev_horz = buf.get_f32_le()?;
31149        __struct.std_dev_vert = buf.get_f32_le()?;
31150        __struct.vn = buf.get_f32_le()?;
31151        __struct.ve = buf.get_f32_le()?;
31152        __struct.vd = buf.get_f32_le()?;
31153        __struct.lat_int = buf.get_i32_le()?;
31154        __struct.lon_int = buf.get_i32_le()?;
31155        Ok(__struct)
31156    }
31157    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31158        let mut __tmp = BytesMut::new(bytes);
31159        #[allow(clippy::absurd_extreme_comparisons)]
31160        #[allow(unused_comparisons)]
31161        if __tmp.remaining() < Self::ENCODED_LEN {
31162            panic!(
31163                "buffer is too small (need {} bytes, but got {})",
31164                Self::ENCODED_LEN,
31165                __tmp.remaining(),
31166            )
31167        }
31168        __tmp.put_f32_le(self.q1);
31169        __tmp.put_f32_le(self.q2);
31170        __tmp.put_f32_le(self.q3);
31171        __tmp.put_f32_le(self.q4);
31172        __tmp.put_f32_le(self.roll);
31173        __tmp.put_f32_le(self.pitch);
31174        __tmp.put_f32_le(self.yaw);
31175        __tmp.put_f32_le(self.xacc);
31176        __tmp.put_f32_le(self.yacc);
31177        __tmp.put_f32_le(self.zacc);
31178        __tmp.put_f32_le(self.xgyro);
31179        __tmp.put_f32_le(self.ygyro);
31180        __tmp.put_f32_le(self.zgyro);
31181        __tmp.put_f32_le(self.lat);
31182        __tmp.put_f32_le(self.lon);
31183        __tmp.put_f32_le(self.alt);
31184        __tmp.put_f32_le(self.std_dev_horz);
31185        __tmp.put_f32_le(self.std_dev_vert);
31186        __tmp.put_f32_le(self.vn);
31187        __tmp.put_f32_le(self.ve);
31188        __tmp.put_f32_le(self.vd);
31189        if matches!(version, MavlinkVersion::V2) {
31190            __tmp.put_i32_le(self.lat_int);
31191            __tmp.put_i32_le(self.lon_int);
31192            let len = __tmp.len();
31193            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31194        } else {
31195            __tmp.len()
31196        }
31197    }
31198}
31199#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
31200#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
31201#[doc = ""]
31202#[doc = "ID: 370"]
31203#[derive(Debug, Clone, PartialEq)]
31204#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31205#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31206#[cfg_attr(feature = "ts", derive(TS))]
31207#[cfg_attr(feature = "ts", ts(export))]
31208pub struct SMART_BATTERY_INFO_DATA {
31209    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
31210    pub capacity_full_specification: i32,
31211    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
31212    pub capacity_full: i32,
31213    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
31214    pub cycle_count: u16,
31215    #[doc = "Battery weight. 0: field not provided."]
31216    pub weight: u16,
31217    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
31218    pub discharge_minimum_voltage: u16,
31219    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
31220    pub charging_minimum_voltage: u16,
31221    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
31222    pub resting_minimum_voltage: u16,
31223    #[doc = "Battery ID"]
31224    pub id: u8,
31225    #[doc = "Function of the battery"]
31226    pub battery_function: MavBatteryFunction,
31227    #[doc = "Type (chemistry) of the battery"]
31228    pub mavtype: MavBatteryType,
31229    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
31230    #[cfg_attr(feature = "ts", ts(type = "string"))]
31231    pub serial_number: CharArray<16>,
31232    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
31233    #[cfg_attr(feature = "ts", ts(type = "string"))]
31234    pub device_name: CharArray<50>,
31235    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
31236    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31237    pub charging_maximum_voltage: u16,
31238    #[doc = "Number of battery cells in series. 0: field not provided."]
31239    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31240    pub cells_in_series: u8,
31241    #[doc = "Maximum pack discharge current. 0: field not provided."]
31242    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31243    pub discharge_maximum_current: u32,
31244    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
31245    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31246    pub discharge_maximum_burst_current: u32,
31247    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
31248    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31249    #[cfg_attr(feature = "ts", ts(type = "string"))]
31250    pub manufacture_date: CharArray<11>,
31251}
31252impl SMART_BATTERY_INFO_DATA {
31253    pub const ENCODED_LEN: usize = 109usize;
31254    pub const DEFAULT: Self = Self {
31255        capacity_full_specification: 0_i32,
31256        capacity_full: 0_i32,
31257        cycle_count: 0_u16,
31258        weight: 0_u16,
31259        discharge_minimum_voltage: 0_u16,
31260        charging_minimum_voltage: 0_u16,
31261        resting_minimum_voltage: 0_u16,
31262        id: 0_u8,
31263        battery_function: MavBatteryFunction::DEFAULT,
31264        mavtype: MavBatteryType::DEFAULT,
31265        serial_number: CharArray::new([0_u8; 16usize]),
31266        device_name: CharArray::new([0_u8; 50usize]),
31267        charging_maximum_voltage: 0_u16,
31268        cells_in_series: 0_u8,
31269        discharge_maximum_current: 0_u32,
31270        discharge_maximum_burst_current: 0_u32,
31271        manufacture_date: CharArray::new([0_u8; 11usize]),
31272    };
31273    #[cfg(feature = "arbitrary")]
31274    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31275        use arbitrary::{Arbitrary, Unstructured};
31276        let mut buf = [0u8; 1024];
31277        rng.fill_bytes(&mut buf);
31278        let mut unstructured = Unstructured::new(&buf);
31279        Self::arbitrary(&mut unstructured).unwrap_or_default()
31280    }
31281}
31282impl Default for SMART_BATTERY_INFO_DATA {
31283    fn default() -> Self {
31284        Self::DEFAULT.clone()
31285    }
31286}
31287impl MessageData for SMART_BATTERY_INFO_DATA {
31288    type Message = MavMessage;
31289    const ID: u32 = 370u32;
31290    const NAME: &'static str = "SMART_BATTERY_INFO";
31291    const EXTRA_CRC: u8 = 75u8;
31292    const ENCODED_LEN: usize = 109usize;
31293    fn deser(
31294        _version: MavlinkVersion,
31295        __input: &[u8],
31296    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31297        let avail_len = __input.len();
31298        let mut payload_buf = [0; Self::ENCODED_LEN];
31299        let mut buf = if avail_len < Self::ENCODED_LEN {
31300            payload_buf[0..avail_len].copy_from_slice(__input);
31301            Bytes::new(&payload_buf)
31302        } else {
31303            Bytes::new(__input)
31304        };
31305        let mut __struct = Self::default();
31306        __struct.capacity_full_specification = buf.get_i32_le()?;
31307        __struct.capacity_full = buf.get_i32_le()?;
31308        __struct.cycle_count = buf.get_u16_le()?;
31309        __struct.weight = buf.get_u16_le()?;
31310        __struct.discharge_minimum_voltage = buf.get_u16_le()?;
31311        __struct.charging_minimum_voltage = buf.get_u16_le()?;
31312        __struct.resting_minimum_voltage = buf.get_u16_le()?;
31313        __struct.id = buf.get_u8()?;
31314        let tmp = buf.get_u8()?;
31315        __struct.battery_function =
31316            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31317                enum_type: "MavBatteryFunction",
31318                value: tmp as u64,
31319            })?;
31320        let tmp = buf.get_u8()?;
31321        __struct.mavtype =
31322            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31323                enum_type: "MavBatteryType",
31324                value: tmp as u64,
31325            })?;
31326        let mut tmp = [0_u8; 16usize];
31327        for v in &mut tmp {
31328            *v = buf.get_u8()?;
31329        }
31330        __struct.serial_number = CharArray::new(tmp);
31331        let mut tmp = [0_u8; 50usize];
31332        for v in &mut tmp {
31333            *v = buf.get_u8()?;
31334        }
31335        __struct.device_name = CharArray::new(tmp);
31336        __struct.charging_maximum_voltage = buf.get_u16_le()?;
31337        __struct.cells_in_series = buf.get_u8()?;
31338        __struct.discharge_maximum_current = buf.get_u32_le()?;
31339        __struct.discharge_maximum_burst_current = buf.get_u32_le()?;
31340        let mut tmp = [0_u8; 11usize];
31341        for v in &mut tmp {
31342            *v = buf.get_u8()?;
31343        }
31344        __struct.manufacture_date = CharArray::new(tmp);
31345        Ok(__struct)
31346    }
31347    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31348        let mut __tmp = BytesMut::new(bytes);
31349        #[allow(clippy::absurd_extreme_comparisons)]
31350        #[allow(unused_comparisons)]
31351        if __tmp.remaining() < Self::ENCODED_LEN {
31352            panic!(
31353                "buffer is too small (need {} bytes, but got {})",
31354                Self::ENCODED_LEN,
31355                __tmp.remaining(),
31356            )
31357        }
31358        __tmp.put_i32_le(self.capacity_full_specification);
31359        __tmp.put_i32_le(self.capacity_full);
31360        __tmp.put_u16_le(self.cycle_count);
31361        __tmp.put_u16_le(self.weight);
31362        __tmp.put_u16_le(self.discharge_minimum_voltage);
31363        __tmp.put_u16_le(self.charging_minimum_voltage);
31364        __tmp.put_u16_le(self.resting_minimum_voltage);
31365        __tmp.put_u8(self.id);
31366        __tmp.put_u8(self.battery_function as u8);
31367        __tmp.put_u8(self.mavtype as u8);
31368        for val in &self.serial_number {
31369            __tmp.put_u8(*val);
31370        }
31371        for val in &self.device_name {
31372            __tmp.put_u8(*val);
31373        }
31374        if matches!(version, MavlinkVersion::V2) {
31375            __tmp.put_u16_le(self.charging_maximum_voltage);
31376            __tmp.put_u8(self.cells_in_series);
31377            __tmp.put_u32_le(self.discharge_maximum_current);
31378            __tmp.put_u32_le(self.discharge_maximum_burst_current);
31379            for val in &self.manufacture_date {
31380                __tmp.put_u8(*val);
31381            }
31382            let len = __tmp.len();
31383            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31384        } else {
31385            __tmp.len()
31386        }
31387    }
31388}
31389#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
31390#[doc = ""]
31391#[doc = "ID: 253"]
31392#[derive(Debug, Clone, PartialEq)]
31393#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31394#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31395#[cfg_attr(feature = "ts", derive(TS))]
31396#[cfg_attr(feature = "ts", ts(export))]
31397pub struct STATUSTEXT_DATA {
31398    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
31399    pub severity: MavSeverity,
31400    #[doc = "Status text message, without null termination character"]
31401    #[cfg_attr(feature = "ts", ts(type = "string"))]
31402    pub text: CharArray<50>,
31403    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
31404    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31405    pub id: u16,
31406    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
31407    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31408    pub chunk_seq: u8,
31409}
31410impl STATUSTEXT_DATA {
31411    pub const ENCODED_LEN: usize = 54usize;
31412    pub const DEFAULT: Self = Self {
31413        severity: MavSeverity::DEFAULT,
31414        text: CharArray::new([0_u8; 50usize]),
31415        id: 0_u16,
31416        chunk_seq: 0_u8,
31417    };
31418    #[cfg(feature = "arbitrary")]
31419    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31420        use arbitrary::{Arbitrary, Unstructured};
31421        let mut buf = [0u8; 1024];
31422        rng.fill_bytes(&mut buf);
31423        let mut unstructured = Unstructured::new(&buf);
31424        Self::arbitrary(&mut unstructured).unwrap_or_default()
31425    }
31426}
31427impl Default for STATUSTEXT_DATA {
31428    fn default() -> Self {
31429        Self::DEFAULT.clone()
31430    }
31431}
31432impl MessageData for STATUSTEXT_DATA {
31433    type Message = MavMessage;
31434    const ID: u32 = 253u32;
31435    const NAME: &'static str = "STATUSTEXT";
31436    const EXTRA_CRC: u8 = 83u8;
31437    const ENCODED_LEN: usize = 54usize;
31438    fn deser(
31439        _version: MavlinkVersion,
31440        __input: &[u8],
31441    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31442        let avail_len = __input.len();
31443        let mut payload_buf = [0; Self::ENCODED_LEN];
31444        let mut buf = if avail_len < Self::ENCODED_LEN {
31445            payload_buf[0..avail_len].copy_from_slice(__input);
31446            Bytes::new(&payload_buf)
31447        } else {
31448            Bytes::new(__input)
31449        };
31450        let mut __struct = Self::default();
31451        let tmp = buf.get_u8()?;
31452        __struct.severity =
31453            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31454                enum_type: "MavSeverity",
31455                value: tmp as u64,
31456            })?;
31457        let mut tmp = [0_u8; 50usize];
31458        for v in &mut tmp {
31459            *v = buf.get_u8()?;
31460        }
31461        __struct.text = CharArray::new(tmp);
31462        __struct.id = buf.get_u16_le()?;
31463        __struct.chunk_seq = buf.get_u8()?;
31464        Ok(__struct)
31465    }
31466    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31467        let mut __tmp = BytesMut::new(bytes);
31468        #[allow(clippy::absurd_extreme_comparisons)]
31469        #[allow(unused_comparisons)]
31470        if __tmp.remaining() < Self::ENCODED_LEN {
31471            panic!(
31472                "buffer is too small (need {} bytes, but got {})",
31473                Self::ENCODED_LEN,
31474                __tmp.remaining(),
31475            )
31476        }
31477        __tmp.put_u8(self.severity as u8);
31478        for val in &self.text {
31479            __tmp.put_u8(*val);
31480        }
31481        if matches!(version, MavlinkVersion::V2) {
31482            __tmp.put_u16_le(self.id);
31483            __tmp.put_u8(self.chunk_seq);
31484            let len = __tmp.len();
31485            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31486        } else {
31487            __tmp.len()
31488        }
31489    }
31490}
31491#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
31492#[doc = ""]
31493#[doc = "ID: 261"]
31494#[derive(Debug, Clone, PartialEq)]
31495#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31496#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31497#[cfg_attr(feature = "ts", derive(TS))]
31498#[cfg_attr(feature = "ts", ts(export))]
31499pub struct STORAGE_INFORMATION_DATA {
31500    #[doc = "Timestamp (time since system boot)."]
31501    pub time_boot_ms: u32,
31502    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
31503    pub total_capacity: f32,
31504    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
31505    pub used_capacity: f32,
31506    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
31507    pub available_capacity: f32,
31508    #[doc = "Read speed."]
31509    pub read_speed: f32,
31510    #[doc = "Write speed."]
31511    pub write_speed: f32,
31512    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
31513    pub storage_id: u8,
31514    #[doc = "Number of storage devices"]
31515    pub storage_count: u8,
31516    #[doc = "Status of storage"]
31517    pub status: StorageStatus,
31518    #[doc = "Type of storage"]
31519    #[cfg_attr(feature = "serde", serde(default))]
31520    pub mavtype: StorageType,
31521    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
31522    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31523    #[cfg_attr(feature = "ts", ts(type = "string"))]
31524    pub name: CharArray<32>,
31525    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
31526    #[cfg_attr(feature = "serde", serde(default))]
31527    pub storage_usage: StorageUsageFlag,
31528}
31529impl STORAGE_INFORMATION_DATA {
31530    pub const ENCODED_LEN: usize = 61usize;
31531    pub const DEFAULT: Self = Self {
31532        time_boot_ms: 0_u32,
31533        total_capacity: 0.0_f32,
31534        used_capacity: 0.0_f32,
31535        available_capacity: 0.0_f32,
31536        read_speed: 0.0_f32,
31537        write_speed: 0.0_f32,
31538        storage_id: 0_u8,
31539        storage_count: 0_u8,
31540        status: StorageStatus::DEFAULT,
31541        mavtype: StorageType::DEFAULT,
31542        name: CharArray::new([0_u8; 32usize]),
31543        storage_usage: StorageUsageFlag::DEFAULT,
31544    };
31545    #[cfg(feature = "arbitrary")]
31546    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31547        use arbitrary::{Arbitrary, Unstructured};
31548        let mut buf = [0u8; 1024];
31549        rng.fill_bytes(&mut buf);
31550        let mut unstructured = Unstructured::new(&buf);
31551        Self::arbitrary(&mut unstructured).unwrap_or_default()
31552    }
31553}
31554impl Default for STORAGE_INFORMATION_DATA {
31555    fn default() -> Self {
31556        Self::DEFAULT.clone()
31557    }
31558}
31559impl MessageData for STORAGE_INFORMATION_DATA {
31560    type Message = MavMessage;
31561    const ID: u32 = 261u32;
31562    const NAME: &'static str = "STORAGE_INFORMATION";
31563    const EXTRA_CRC: u8 = 179u8;
31564    const ENCODED_LEN: usize = 61usize;
31565    fn deser(
31566        _version: MavlinkVersion,
31567        __input: &[u8],
31568    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31569        let avail_len = __input.len();
31570        let mut payload_buf = [0; Self::ENCODED_LEN];
31571        let mut buf = if avail_len < Self::ENCODED_LEN {
31572            payload_buf[0..avail_len].copy_from_slice(__input);
31573            Bytes::new(&payload_buf)
31574        } else {
31575            Bytes::new(__input)
31576        };
31577        let mut __struct = Self::default();
31578        __struct.time_boot_ms = buf.get_u32_le()?;
31579        __struct.total_capacity = buf.get_f32_le()?;
31580        __struct.used_capacity = buf.get_f32_le()?;
31581        __struct.available_capacity = buf.get_f32_le()?;
31582        __struct.read_speed = buf.get_f32_le()?;
31583        __struct.write_speed = buf.get_f32_le()?;
31584        __struct.storage_id = buf.get_u8()?;
31585        __struct.storage_count = buf.get_u8()?;
31586        let tmp = buf.get_u8()?;
31587        __struct.status =
31588            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31589                enum_type: "StorageStatus",
31590                value: tmp as u64,
31591            })?;
31592        let tmp = buf.get_u8()?;
31593        __struct.mavtype =
31594            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31595                enum_type: "StorageType",
31596                value: tmp as u64,
31597            })?;
31598        let mut tmp = [0_u8; 32usize];
31599        for v in &mut tmp {
31600            *v = buf.get_u8()?;
31601        }
31602        __struct.name = CharArray::new(tmp);
31603        let tmp = buf.get_u8()?;
31604        __struct.storage_usage = StorageUsageFlag::from_bits(
31605            tmp as <StorageUsageFlag as Flags>::Bits,
31606        )
31607        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31608            flag_type: "StorageUsageFlag",
31609            value: tmp as u64,
31610        })?;
31611        Ok(__struct)
31612    }
31613    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31614        let mut __tmp = BytesMut::new(bytes);
31615        #[allow(clippy::absurd_extreme_comparisons)]
31616        #[allow(unused_comparisons)]
31617        if __tmp.remaining() < Self::ENCODED_LEN {
31618            panic!(
31619                "buffer is too small (need {} bytes, but got {})",
31620                Self::ENCODED_LEN,
31621                __tmp.remaining(),
31622            )
31623        }
31624        __tmp.put_u32_le(self.time_boot_ms);
31625        __tmp.put_f32_le(self.total_capacity);
31626        __tmp.put_f32_le(self.used_capacity);
31627        __tmp.put_f32_le(self.available_capacity);
31628        __tmp.put_f32_le(self.read_speed);
31629        __tmp.put_f32_le(self.write_speed);
31630        __tmp.put_u8(self.storage_id);
31631        __tmp.put_u8(self.storage_count);
31632        __tmp.put_u8(self.status as u8);
31633        if matches!(version, MavlinkVersion::V2) {
31634            __tmp.put_u8(self.mavtype as u8);
31635            for val in &self.name {
31636                __tmp.put_u8(*val);
31637            }
31638            __tmp.put_u8(self.storage_usage.bits() as u8);
31639            let len = __tmp.len();
31640            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31641        } else {
31642            __tmp.len()
31643        }
31644    }
31645}
31646#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
31647#[doc = ""]
31648#[doc = "ID: 401"]
31649#[derive(Debug, Clone, PartialEq)]
31650#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31651#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31652#[cfg_attr(feature = "ts", derive(TS))]
31653#[cfg_attr(feature = "ts", ts(export))]
31654pub struct SUPPORTED_TUNES_DATA {
31655    #[doc = "Bitfield of supported tune formats."]
31656    pub format: TuneFormat,
31657    #[doc = "System ID"]
31658    pub target_system: u8,
31659    #[doc = "Component ID"]
31660    pub target_component: u8,
31661}
31662impl SUPPORTED_TUNES_DATA {
31663    pub const ENCODED_LEN: usize = 6usize;
31664    pub const DEFAULT: Self = Self {
31665        format: TuneFormat::DEFAULT,
31666        target_system: 0_u8,
31667        target_component: 0_u8,
31668    };
31669    #[cfg(feature = "arbitrary")]
31670    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31671        use arbitrary::{Arbitrary, Unstructured};
31672        let mut buf = [0u8; 1024];
31673        rng.fill_bytes(&mut buf);
31674        let mut unstructured = Unstructured::new(&buf);
31675        Self::arbitrary(&mut unstructured).unwrap_or_default()
31676    }
31677}
31678impl Default for SUPPORTED_TUNES_DATA {
31679    fn default() -> Self {
31680        Self::DEFAULT.clone()
31681    }
31682}
31683impl MessageData for SUPPORTED_TUNES_DATA {
31684    type Message = MavMessage;
31685    const ID: u32 = 401u32;
31686    const NAME: &'static str = "SUPPORTED_TUNES";
31687    const EXTRA_CRC: u8 = 183u8;
31688    const ENCODED_LEN: usize = 6usize;
31689    fn deser(
31690        _version: MavlinkVersion,
31691        __input: &[u8],
31692    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31693        let avail_len = __input.len();
31694        let mut payload_buf = [0; Self::ENCODED_LEN];
31695        let mut buf = if avail_len < Self::ENCODED_LEN {
31696            payload_buf[0..avail_len].copy_from_slice(__input);
31697            Bytes::new(&payload_buf)
31698        } else {
31699            Bytes::new(__input)
31700        };
31701        let mut __struct = Self::default();
31702        let tmp = buf.get_u32_le()?;
31703        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
31704            ::mavlink_core::error::ParserError::InvalidEnum {
31705                enum_type: "TuneFormat",
31706                value: tmp as u64,
31707            },
31708        )?;
31709        __struct.target_system = buf.get_u8()?;
31710        __struct.target_component = buf.get_u8()?;
31711        Ok(__struct)
31712    }
31713    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31714        let mut __tmp = BytesMut::new(bytes);
31715        #[allow(clippy::absurd_extreme_comparisons)]
31716        #[allow(unused_comparisons)]
31717        if __tmp.remaining() < Self::ENCODED_LEN {
31718            panic!(
31719                "buffer is too small (need {} bytes, but got {})",
31720                Self::ENCODED_LEN,
31721                __tmp.remaining(),
31722            )
31723        }
31724        __tmp.put_u32_le(self.format as u32);
31725        __tmp.put_u8(self.target_system);
31726        __tmp.put_u8(self.target_component);
31727        if matches!(version, MavlinkVersion::V2) {
31728            let len = __tmp.len();
31729            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31730        } else {
31731            __tmp.len()
31732        }
31733    }
31734}
31735#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
31736#[doc = ""]
31737#[doc = "ID: 2"]
31738#[derive(Debug, Clone, PartialEq)]
31739#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31740#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31741#[cfg_attr(feature = "ts", derive(TS))]
31742#[cfg_attr(feature = "ts", ts(export))]
31743pub struct SYSTEM_TIME_DATA {
31744    #[doc = "Timestamp (UNIX epoch time)."]
31745    pub time_unix_usec: u64,
31746    #[doc = "Timestamp (time since system boot)."]
31747    pub time_boot_ms: u32,
31748}
31749impl SYSTEM_TIME_DATA {
31750    pub const ENCODED_LEN: usize = 12usize;
31751    pub const DEFAULT: Self = Self {
31752        time_unix_usec: 0_u64,
31753        time_boot_ms: 0_u32,
31754    };
31755    #[cfg(feature = "arbitrary")]
31756    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31757        use arbitrary::{Arbitrary, Unstructured};
31758        let mut buf = [0u8; 1024];
31759        rng.fill_bytes(&mut buf);
31760        let mut unstructured = Unstructured::new(&buf);
31761        Self::arbitrary(&mut unstructured).unwrap_or_default()
31762    }
31763}
31764impl Default for SYSTEM_TIME_DATA {
31765    fn default() -> Self {
31766        Self::DEFAULT.clone()
31767    }
31768}
31769impl MessageData for SYSTEM_TIME_DATA {
31770    type Message = MavMessage;
31771    const ID: u32 = 2u32;
31772    const NAME: &'static str = "SYSTEM_TIME";
31773    const EXTRA_CRC: u8 = 137u8;
31774    const ENCODED_LEN: usize = 12usize;
31775    fn deser(
31776        _version: MavlinkVersion,
31777        __input: &[u8],
31778    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31779        let avail_len = __input.len();
31780        let mut payload_buf = [0; Self::ENCODED_LEN];
31781        let mut buf = if avail_len < Self::ENCODED_LEN {
31782            payload_buf[0..avail_len].copy_from_slice(__input);
31783            Bytes::new(&payload_buf)
31784        } else {
31785            Bytes::new(__input)
31786        };
31787        let mut __struct = Self::default();
31788        __struct.time_unix_usec = buf.get_u64_le()?;
31789        __struct.time_boot_ms = buf.get_u32_le()?;
31790        Ok(__struct)
31791    }
31792    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31793        let mut __tmp = BytesMut::new(bytes);
31794        #[allow(clippy::absurd_extreme_comparisons)]
31795        #[allow(unused_comparisons)]
31796        if __tmp.remaining() < Self::ENCODED_LEN {
31797            panic!(
31798                "buffer is too small (need {} bytes, but got {})",
31799                Self::ENCODED_LEN,
31800                __tmp.remaining(),
31801            )
31802        }
31803        __tmp.put_u64_le(self.time_unix_usec);
31804        __tmp.put_u32_le(self.time_boot_ms);
31805        if matches!(version, MavlinkVersion::V2) {
31806            let len = __tmp.len();
31807            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31808        } else {
31809            __tmp.len()
31810        }
31811    }
31812}
31813#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
31814#[doc = ""]
31815#[doc = "ID: 1"]
31816#[derive(Debug, Clone, PartialEq)]
31817#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31818#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31819#[cfg_attr(feature = "ts", derive(TS))]
31820#[cfg_attr(feature = "ts", ts(export))]
31821pub struct SYS_STATUS_DATA {
31822    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
31823    pub onboard_control_sensors_present: MavSysStatusSensor,
31824    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
31825    pub onboard_control_sensors_enabled: MavSysStatusSensor,
31826    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
31827    pub onboard_control_sensors_health: MavSysStatusSensor,
31828    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
31829    pub load: u16,
31830    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
31831    pub voltage_battery: u16,
31832    #[doc = "Battery current, -1: Current not sent by autopilot"]
31833    pub current_battery: i16,
31834    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
31835    pub drop_rate_comm: u16,
31836    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
31837    pub errors_comm: u16,
31838    #[doc = "Autopilot-specific errors"]
31839    pub errors_count1: u16,
31840    #[doc = "Autopilot-specific errors"]
31841    pub errors_count2: u16,
31842    #[doc = "Autopilot-specific errors"]
31843    pub errors_count3: u16,
31844    #[doc = "Autopilot-specific errors"]
31845    pub errors_count4: u16,
31846    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
31847    pub battery_remaining: i8,
31848    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
31849    #[cfg_attr(feature = "serde", serde(default))]
31850    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
31851    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
31852    #[cfg_attr(feature = "serde", serde(default))]
31853    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
31854    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
31855    #[cfg_attr(feature = "serde", serde(default))]
31856    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
31857}
31858impl SYS_STATUS_DATA {
31859    pub const ENCODED_LEN: usize = 43usize;
31860    pub const DEFAULT: Self = Self {
31861        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
31862        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
31863        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
31864        load: 0_u16,
31865        voltage_battery: 0_u16,
31866        current_battery: 0_i16,
31867        drop_rate_comm: 0_u16,
31868        errors_comm: 0_u16,
31869        errors_count1: 0_u16,
31870        errors_count2: 0_u16,
31871        errors_count3: 0_u16,
31872        errors_count4: 0_u16,
31873        battery_remaining: 0_i8,
31874        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
31875        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
31876        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
31877    };
31878    #[cfg(feature = "arbitrary")]
31879    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31880        use arbitrary::{Arbitrary, Unstructured};
31881        let mut buf = [0u8; 1024];
31882        rng.fill_bytes(&mut buf);
31883        let mut unstructured = Unstructured::new(&buf);
31884        Self::arbitrary(&mut unstructured).unwrap_or_default()
31885    }
31886}
31887impl Default for SYS_STATUS_DATA {
31888    fn default() -> Self {
31889        Self::DEFAULT.clone()
31890    }
31891}
31892impl MessageData for SYS_STATUS_DATA {
31893    type Message = MavMessage;
31894    const ID: u32 = 1u32;
31895    const NAME: &'static str = "SYS_STATUS";
31896    const EXTRA_CRC: u8 = 124u8;
31897    const ENCODED_LEN: usize = 43usize;
31898    fn deser(
31899        _version: MavlinkVersion,
31900        __input: &[u8],
31901    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31902        let avail_len = __input.len();
31903        let mut payload_buf = [0; Self::ENCODED_LEN];
31904        let mut buf = if avail_len < Self::ENCODED_LEN {
31905            payload_buf[0..avail_len].copy_from_slice(__input);
31906            Bytes::new(&payload_buf)
31907        } else {
31908            Bytes::new(__input)
31909        };
31910        let mut __struct = Self::default();
31911        let tmp = buf.get_u32_le()?;
31912        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
31913            tmp as <MavSysStatusSensor as Flags>::Bits,
31914        )
31915        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31916            flag_type: "MavSysStatusSensor",
31917            value: tmp as u64,
31918        })?;
31919        let tmp = buf.get_u32_le()?;
31920        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
31921            tmp as <MavSysStatusSensor as Flags>::Bits,
31922        )
31923        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31924            flag_type: "MavSysStatusSensor",
31925            value: tmp as u64,
31926        })?;
31927        let tmp = buf.get_u32_le()?;
31928        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
31929            tmp as <MavSysStatusSensor as Flags>::Bits,
31930        )
31931        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31932            flag_type: "MavSysStatusSensor",
31933            value: tmp as u64,
31934        })?;
31935        __struct.load = buf.get_u16_le()?;
31936        __struct.voltage_battery = buf.get_u16_le()?;
31937        __struct.current_battery = buf.get_i16_le()?;
31938        __struct.drop_rate_comm = buf.get_u16_le()?;
31939        __struct.errors_comm = buf.get_u16_le()?;
31940        __struct.errors_count1 = buf.get_u16_le()?;
31941        __struct.errors_count2 = buf.get_u16_le()?;
31942        __struct.errors_count3 = buf.get_u16_le()?;
31943        __struct.errors_count4 = buf.get_u16_le()?;
31944        __struct.battery_remaining = buf.get_i8()?;
31945        let tmp = buf.get_u32_le()?;
31946        __struct.onboard_control_sensors_present_extended = MavSysStatusSensorExtended::from_bits(
31947            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
31948        )
31949        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31950            flag_type: "MavSysStatusSensorExtended",
31951            value: tmp as u64,
31952        })?;
31953        let tmp = buf.get_u32_le()?;
31954        __struct.onboard_control_sensors_enabled_extended = MavSysStatusSensorExtended::from_bits(
31955            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
31956        )
31957        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31958            flag_type: "MavSysStatusSensorExtended",
31959            value: tmp as u64,
31960        })?;
31961        let tmp = buf.get_u32_le()?;
31962        __struct.onboard_control_sensors_health_extended = MavSysStatusSensorExtended::from_bits(
31963            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
31964        )
31965        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31966            flag_type: "MavSysStatusSensorExtended",
31967            value: tmp as u64,
31968        })?;
31969        Ok(__struct)
31970    }
31971    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31972        let mut __tmp = BytesMut::new(bytes);
31973        #[allow(clippy::absurd_extreme_comparisons)]
31974        #[allow(unused_comparisons)]
31975        if __tmp.remaining() < Self::ENCODED_LEN {
31976            panic!(
31977                "buffer is too small (need {} bytes, but got {})",
31978                Self::ENCODED_LEN,
31979                __tmp.remaining(),
31980            )
31981        }
31982        __tmp.put_u32_le(self.onboard_control_sensors_present.bits() as u32);
31983        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits() as u32);
31984        __tmp.put_u32_le(self.onboard_control_sensors_health.bits() as u32);
31985        __tmp.put_u16_le(self.load);
31986        __tmp.put_u16_le(self.voltage_battery);
31987        __tmp.put_i16_le(self.current_battery);
31988        __tmp.put_u16_le(self.drop_rate_comm);
31989        __tmp.put_u16_le(self.errors_comm);
31990        __tmp.put_u16_le(self.errors_count1);
31991        __tmp.put_u16_le(self.errors_count2);
31992        __tmp.put_u16_le(self.errors_count3);
31993        __tmp.put_u16_le(self.errors_count4);
31994        __tmp.put_i8(self.battery_remaining);
31995        if matches!(version, MavlinkVersion::V2) {
31996            __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits() as u32);
31997            __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits() as u32);
31998            __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits() as u32);
31999            let len = __tmp.len();
32000            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32001        } else {
32002            __tmp.len()
32003        }
32004    }
32005}
32006#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
32007#[doc = ""]
32008#[doc = "ID: 135"]
32009#[derive(Debug, Clone, PartialEq)]
32010#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32011#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32012#[cfg_attr(feature = "ts", derive(TS))]
32013#[cfg_attr(feature = "ts", ts(export))]
32014pub struct TERRAIN_CHECK_DATA {
32015    #[doc = "Latitude"]
32016    pub lat: i32,
32017    #[doc = "Longitude"]
32018    pub lon: i32,
32019}
32020impl TERRAIN_CHECK_DATA {
32021    pub const ENCODED_LEN: usize = 8usize;
32022    pub const DEFAULT: Self = Self {
32023        lat: 0_i32,
32024        lon: 0_i32,
32025    };
32026    #[cfg(feature = "arbitrary")]
32027    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32028        use arbitrary::{Arbitrary, Unstructured};
32029        let mut buf = [0u8; 1024];
32030        rng.fill_bytes(&mut buf);
32031        let mut unstructured = Unstructured::new(&buf);
32032        Self::arbitrary(&mut unstructured).unwrap_or_default()
32033    }
32034}
32035impl Default for TERRAIN_CHECK_DATA {
32036    fn default() -> Self {
32037        Self::DEFAULT.clone()
32038    }
32039}
32040impl MessageData for TERRAIN_CHECK_DATA {
32041    type Message = MavMessage;
32042    const ID: u32 = 135u32;
32043    const NAME: &'static str = "TERRAIN_CHECK";
32044    const EXTRA_CRC: u8 = 203u8;
32045    const ENCODED_LEN: usize = 8usize;
32046    fn deser(
32047        _version: MavlinkVersion,
32048        __input: &[u8],
32049    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32050        let avail_len = __input.len();
32051        let mut payload_buf = [0; Self::ENCODED_LEN];
32052        let mut buf = if avail_len < Self::ENCODED_LEN {
32053            payload_buf[0..avail_len].copy_from_slice(__input);
32054            Bytes::new(&payload_buf)
32055        } else {
32056            Bytes::new(__input)
32057        };
32058        let mut __struct = Self::default();
32059        __struct.lat = buf.get_i32_le()?;
32060        __struct.lon = buf.get_i32_le()?;
32061        Ok(__struct)
32062    }
32063    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32064        let mut __tmp = BytesMut::new(bytes);
32065        #[allow(clippy::absurd_extreme_comparisons)]
32066        #[allow(unused_comparisons)]
32067        if __tmp.remaining() < Self::ENCODED_LEN {
32068            panic!(
32069                "buffer is too small (need {} bytes, but got {})",
32070                Self::ENCODED_LEN,
32071                __tmp.remaining(),
32072            )
32073        }
32074        __tmp.put_i32_le(self.lat);
32075        __tmp.put_i32_le(self.lon);
32076        if matches!(version, MavlinkVersion::V2) {
32077            let len = __tmp.len();
32078            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32079        } else {
32080            __tmp.len()
32081        }
32082    }
32083}
32084#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
32085#[doc = ""]
32086#[doc = "ID: 134"]
32087#[derive(Debug, Clone, PartialEq)]
32088#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32089#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32090#[cfg_attr(feature = "ts", derive(TS))]
32091#[cfg_attr(feature = "ts", ts(export))]
32092pub struct TERRAIN_DATA_DATA {
32093    #[doc = "Latitude of SW corner of first grid"]
32094    pub lat: i32,
32095    #[doc = "Longitude of SW corner of first grid"]
32096    pub lon: i32,
32097    #[doc = "Grid spacing"]
32098    pub grid_spacing: u16,
32099    #[doc = "Terrain data MSL"]
32100    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32101    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32102    pub data: [i16; 16],
32103    #[doc = "bit within the terrain request mask"]
32104    pub gridbit: u8,
32105}
32106impl TERRAIN_DATA_DATA {
32107    pub const ENCODED_LEN: usize = 43usize;
32108    pub const DEFAULT: Self = Self {
32109        lat: 0_i32,
32110        lon: 0_i32,
32111        grid_spacing: 0_u16,
32112        data: [0_i16; 16usize],
32113        gridbit: 0_u8,
32114    };
32115    #[cfg(feature = "arbitrary")]
32116    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32117        use arbitrary::{Arbitrary, Unstructured};
32118        let mut buf = [0u8; 1024];
32119        rng.fill_bytes(&mut buf);
32120        let mut unstructured = Unstructured::new(&buf);
32121        Self::arbitrary(&mut unstructured).unwrap_or_default()
32122    }
32123}
32124impl Default for TERRAIN_DATA_DATA {
32125    fn default() -> Self {
32126        Self::DEFAULT.clone()
32127    }
32128}
32129impl MessageData for TERRAIN_DATA_DATA {
32130    type Message = MavMessage;
32131    const ID: u32 = 134u32;
32132    const NAME: &'static str = "TERRAIN_DATA";
32133    const EXTRA_CRC: u8 = 229u8;
32134    const ENCODED_LEN: usize = 43usize;
32135    fn deser(
32136        _version: MavlinkVersion,
32137        __input: &[u8],
32138    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32139        let avail_len = __input.len();
32140        let mut payload_buf = [0; Self::ENCODED_LEN];
32141        let mut buf = if avail_len < Self::ENCODED_LEN {
32142            payload_buf[0..avail_len].copy_from_slice(__input);
32143            Bytes::new(&payload_buf)
32144        } else {
32145            Bytes::new(__input)
32146        };
32147        let mut __struct = Self::default();
32148        __struct.lat = buf.get_i32_le()?;
32149        __struct.lon = buf.get_i32_le()?;
32150        __struct.grid_spacing = buf.get_u16_le()?;
32151        for v in &mut __struct.data {
32152            let val = buf.get_i16_le()?;
32153            *v = val;
32154        }
32155        __struct.gridbit = buf.get_u8()?;
32156        Ok(__struct)
32157    }
32158    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32159        let mut __tmp = BytesMut::new(bytes);
32160        #[allow(clippy::absurd_extreme_comparisons)]
32161        #[allow(unused_comparisons)]
32162        if __tmp.remaining() < Self::ENCODED_LEN {
32163            panic!(
32164                "buffer is too small (need {} bytes, but got {})",
32165                Self::ENCODED_LEN,
32166                __tmp.remaining(),
32167            )
32168        }
32169        __tmp.put_i32_le(self.lat);
32170        __tmp.put_i32_le(self.lon);
32171        __tmp.put_u16_le(self.grid_spacing);
32172        for val in &self.data {
32173            __tmp.put_i16_le(*val);
32174        }
32175        __tmp.put_u8(self.gridbit);
32176        if matches!(version, MavlinkVersion::V2) {
32177            let len = __tmp.len();
32178            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32179        } else {
32180            __tmp.len()
32181        }
32182    }
32183}
32184#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
32185#[doc = ""]
32186#[doc = "ID: 136"]
32187#[derive(Debug, Clone, PartialEq)]
32188#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32189#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32190#[cfg_attr(feature = "ts", derive(TS))]
32191#[cfg_attr(feature = "ts", ts(export))]
32192pub struct TERRAIN_REPORT_DATA {
32193    #[doc = "Latitude"]
32194    pub lat: i32,
32195    #[doc = "Longitude"]
32196    pub lon: i32,
32197    #[doc = "Terrain height MSL"]
32198    pub terrain_height: f32,
32199    #[doc = "Current vehicle height above lat/lon terrain height"]
32200    pub current_height: f32,
32201    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
32202    pub spacing: u16,
32203    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
32204    pub pending: u16,
32205    #[doc = "Number of 4x4 terrain blocks in memory"]
32206    pub loaded: u16,
32207}
32208impl TERRAIN_REPORT_DATA {
32209    pub const ENCODED_LEN: usize = 22usize;
32210    pub const DEFAULT: Self = Self {
32211        lat: 0_i32,
32212        lon: 0_i32,
32213        terrain_height: 0.0_f32,
32214        current_height: 0.0_f32,
32215        spacing: 0_u16,
32216        pending: 0_u16,
32217        loaded: 0_u16,
32218    };
32219    #[cfg(feature = "arbitrary")]
32220    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32221        use arbitrary::{Arbitrary, Unstructured};
32222        let mut buf = [0u8; 1024];
32223        rng.fill_bytes(&mut buf);
32224        let mut unstructured = Unstructured::new(&buf);
32225        Self::arbitrary(&mut unstructured).unwrap_or_default()
32226    }
32227}
32228impl Default for TERRAIN_REPORT_DATA {
32229    fn default() -> Self {
32230        Self::DEFAULT.clone()
32231    }
32232}
32233impl MessageData for TERRAIN_REPORT_DATA {
32234    type Message = MavMessage;
32235    const ID: u32 = 136u32;
32236    const NAME: &'static str = "TERRAIN_REPORT";
32237    const EXTRA_CRC: u8 = 1u8;
32238    const ENCODED_LEN: usize = 22usize;
32239    fn deser(
32240        _version: MavlinkVersion,
32241        __input: &[u8],
32242    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32243        let avail_len = __input.len();
32244        let mut payload_buf = [0; Self::ENCODED_LEN];
32245        let mut buf = if avail_len < Self::ENCODED_LEN {
32246            payload_buf[0..avail_len].copy_from_slice(__input);
32247            Bytes::new(&payload_buf)
32248        } else {
32249            Bytes::new(__input)
32250        };
32251        let mut __struct = Self::default();
32252        __struct.lat = buf.get_i32_le()?;
32253        __struct.lon = buf.get_i32_le()?;
32254        __struct.terrain_height = buf.get_f32_le()?;
32255        __struct.current_height = buf.get_f32_le()?;
32256        __struct.spacing = buf.get_u16_le()?;
32257        __struct.pending = buf.get_u16_le()?;
32258        __struct.loaded = buf.get_u16_le()?;
32259        Ok(__struct)
32260    }
32261    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32262        let mut __tmp = BytesMut::new(bytes);
32263        #[allow(clippy::absurd_extreme_comparisons)]
32264        #[allow(unused_comparisons)]
32265        if __tmp.remaining() < Self::ENCODED_LEN {
32266            panic!(
32267                "buffer is too small (need {} bytes, but got {})",
32268                Self::ENCODED_LEN,
32269                __tmp.remaining(),
32270            )
32271        }
32272        __tmp.put_i32_le(self.lat);
32273        __tmp.put_i32_le(self.lon);
32274        __tmp.put_f32_le(self.terrain_height);
32275        __tmp.put_f32_le(self.current_height);
32276        __tmp.put_u16_le(self.spacing);
32277        __tmp.put_u16_le(self.pending);
32278        __tmp.put_u16_le(self.loaded);
32279        if matches!(version, MavlinkVersion::V2) {
32280            let len = __tmp.len();
32281            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32282        } else {
32283            __tmp.len()
32284        }
32285    }
32286}
32287#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
32288#[doc = ""]
32289#[doc = "ID: 133"]
32290#[derive(Debug, Clone, PartialEq)]
32291#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32292#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32293#[cfg_attr(feature = "ts", derive(TS))]
32294#[cfg_attr(feature = "ts", ts(export))]
32295pub struct TERRAIN_REQUEST_DATA {
32296    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
32297    pub mask: u64,
32298    #[doc = "Latitude of SW corner of first grid"]
32299    pub lat: i32,
32300    #[doc = "Longitude of SW corner of first grid"]
32301    pub lon: i32,
32302    #[doc = "Grid spacing"]
32303    pub grid_spacing: u16,
32304}
32305impl TERRAIN_REQUEST_DATA {
32306    pub const ENCODED_LEN: usize = 18usize;
32307    pub const DEFAULT: Self = Self {
32308        mask: 0_u64,
32309        lat: 0_i32,
32310        lon: 0_i32,
32311        grid_spacing: 0_u16,
32312    };
32313    #[cfg(feature = "arbitrary")]
32314    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32315        use arbitrary::{Arbitrary, Unstructured};
32316        let mut buf = [0u8; 1024];
32317        rng.fill_bytes(&mut buf);
32318        let mut unstructured = Unstructured::new(&buf);
32319        Self::arbitrary(&mut unstructured).unwrap_or_default()
32320    }
32321}
32322impl Default for TERRAIN_REQUEST_DATA {
32323    fn default() -> Self {
32324        Self::DEFAULT.clone()
32325    }
32326}
32327impl MessageData for TERRAIN_REQUEST_DATA {
32328    type Message = MavMessage;
32329    const ID: u32 = 133u32;
32330    const NAME: &'static str = "TERRAIN_REQUEST";
32331    const EXTRA_CRC: u8 = 6u8;
32332    const ENCODED_LEN: usize = 18usize;
32333    fn deser(
32334        _version: MavlinkVersion,
32335        __input: &[u8],
32336    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32337        let avail_len = __input.len();
32338        let mut payload_buf = [0; Self::ENCODED_LEN];
32339        let mut buf = if avail_len < Self::ENCODED_LEN {
32340            payload_buf[0..avail_len].copy_from_slice(__input);
32341            Bytes::new(&payload_buf)
32342        } else {
32343            Bytes::new(__input)
32344        };
32345        let mut __struct = Self::default();
32346        __struct.mask = buf.get_u64_le()?;
32347        __struct.lat = buf.get_i32_le()?;
32348        __struct.lon = buf.get_i32_le()?;
32349        __struct.grid_spacing = buf.get_u16_le()?;
32350        Ok(__struct)
32351    }
32352    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32353        let mut __tmp = BytesMut::new(bytes);
32354        #[allow(clippy::absurd_extreme_comparisons)]
32355        #[allow(unused_comparisons)]
32356        if __tmp.remaining() < Self::ENCODED_LEN {
32357            panic!(
32358                "buffer is too small (need {} bytes, but got {})",
32359                Self::ENCODED_LEN,
32360                __tmp.remaining(),
32361            )
32362        }
32363        __tmp.put_u64_le(self.mask);
32364        __tmp.put_i32_le(self.lat);
32365        __tmp.put_i32_le(self.lon);
32366        __tmp.put_u16_le(self.grid_spacing);
32367        if matches!(version, MavlinkVersion::V2) {
32368            let len = __tmp.len();
32369            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32370        } else {
32371            __tmp.len()
32372        }
32373    }
32374}
32375#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
32376#[doc = ""]
32377#[doc = "ID: 111"]
32378#[derive(Debug, Clone, PartialEq)]
32379#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32380#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32381#[cfg_attr(feature = "ts", derive(TS))]
32382#[cfg_attr(feature = "ts", ts(export))]
32383pub struct TIMESYNC_DATA {
32384    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
32385    pub tc1: i64,
32386    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
32387    pub ts1: i64,
32388    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
32389    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32390    pub target_system: u8,
32391    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
32392    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32393    pub target_component: u8,
32394}
32395impl TIMESYNC_DATA {
32396    pub const ENCODED_LEN: usize = 18usize;
32397    pub const DEFAULT: Self = Self {
32398        tc1: 0_i64,
32399        ts1: 0_i64,
32400        target_system: 0_u8,
32401        target_component: 0_u8,
32402    };
32403    #[cfg(feature = "arbitrary")]
32404    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32405        use arbitrary::{Arbitrary, Unstructured};
32406        let mut buf = [0u8; 1024];
32407        rng.fill_bytes(&mut buf);
32408        let mut unstructured = Unstructured::new(&buf);
32409        Self::arbitrary(&mut unstructured).unwrap_or_default()
32410    }
32411}
32412impl Default for TIMESYNC_DATA {
32413    fn default() -> Self {
32414        Self::DEFAULT.clone()
32415    }
32416}
32417impl MessageData for TIMESYNC_DATA {
32418    type Message = MavMessage;
32419    const ID: u32 = 111u32;
32420    const NAME: &'static str = "TIMESYNC";
32421    const EXTRA_CRC: u8 = 34u8;
32422    const ENCODED_LEN: usize = 18usize;
32423    fn deser(
32424        _version: MavlinkVersion,
32425        __input: &[u8],
32426    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32427        let avail_len = __input.len();
32428        let mut payload_buf = [0; Self::ENCODED_LEN];
32429        let mut buf = if avail_len < Self::ENCODED_LEN {
32430            payload_buf[0..avail_len].copy_from_slice(__input);
32431            Bytes::new(&payload_buf)
32432        } else {
32433            Bytes::new(__input)
32434        };
32435        let mut __struct = Self::default();
32436        __struct.tc1 = buf.get_i64_le()?;
32437        __struct.ts1 = buf.get_i64_le()?;
32438        __struct.target_system = buf.get_u8()?;
32439        __struct.target_component = buf.get_u8()?;
32440        Ok(__struct)
32441    }
32442    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32443        let mut __tmp = BytesMut::new(bytes);
32444        #[allow(clippy::absurd_extreme_comparisons)]
32445        #[allow(unused_comparisons)]
32446        if __tmp.remaining() < Self::ENCODED_LEN {
32447            panic!(
32448                "buffer is too small (need {} bytes, but got {})",
32449                Self::ENCODED_LEN,
32450                __tmp.remaining(),
32451            )
32452        }
32453        __tmp.put_i64_le(self.tc1);
32454        __tmp.put_i64_le(self.ts1);
32455        if matches!(version, MavlinkVersion::V2) {
32456            __tmp.put_u8(self.target_system);
32457            __tmp.put_u8(self.target_component);
32458            let len = __tmp.len();
32459            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32460        } else {
32461            __tmp.len()
32462        }
32463    }
32464}
32465#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
32466#[doc = ""]
32467#[doc = "ID: 380"]
32468#[derive(Debug, Clone, PartialEq)]
32469#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32470#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32471#[cfg_attr(feature = "ts", derive(TS))]
32472#[cfg_attr(feature = "ts", ts(export))]
32473pub struct TIME_ESTIMATE_TO_TARGET_DATA {
32474    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
32475    pub safe_return: i32,
32476    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
32477    pub land: i32,
32478    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
32479    pub mission_next_item: i32,
32480    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
32481    pub mission_end: i32,
32482    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
32483    pub commanded_action: i32,
32484}
32485impl TIME_ESTIMATE_TO_TARGET_DATA {
32486    pub const ENCODED_LEN: usize = 20usize;
32487    pub const DEFAULT: Self = Self {
32488        safe_return: 0_i32,
32489        land: 0_i32,
32490        mission_next_item: 0_i32,
32491        mission_end: 0_i32,
32492        commanded_action: 0_i32,
32493    };
32494    #[cfg(feature = "arbitrary")]
32495    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32496        use arbitrary::{Arbitrary, Unstructured};
32497        let mut buf = [0u8; 1024];
32498        rng.fill_bytes(&mut buf);
32499        let mut unstructured = Unstructured::new(&buf);
32500        Self::arbitrary(&mut unstructured).unwrap_or_default()
32501    }
32502}
32503impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
32504    fn default() -> Self {
32505        Self::DEFAULT.clone()
32506    }
32507}
32508impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
32509    type Message = MavMessage;
32510    const ID: u32 = 380u32;
32511    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
32512    const EXTRA_CRC: u8 = 232u8;
32513    const ENCODED_LEN: usize = 20usize;
32514    fn deser(
32515        _version: MavlinkVersion,
32516        __input: &[u8],
32517    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32518        let avail_len = __input.len();
32519        let mut payload_buf = [0; Self::ENCODED_LEN];
32520        let mut buf = if avail_len < Self::ENCODED_LEN {
32521            payload_buf[0..avail_len].copy_from_slice(__input);
32522            Bytes::new(&payload_buf)
32523        } else {
32524            Bytes::new(__input)
32525        };
32526        let mut __struct = Self::default();
32527        __struct.safe_return = buf.get_i32_le()?;
32528        __struct.land = buf.get_i32_le()?;
32529        __struct.mission_next_item = buf.get_i32_le()?;
32530        __struct.mission_end = buf.get_i32_le()?;
32531        __struct.commanded_action = buf.get_i32_le()?;
32532        Ok(__struct)
32533    }
32534    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32535        let mut __tmp = BytesMut::new(bytes);
32536        #[allow(clippy::absurd_extreme_comparisons)]
32537        #[allow(unused_comparisons)]
32538        if __tmp.remaining() < Self::ENCODED_LEN {
32539            panic!(
32540                "buffer is too small (need {} bytes, but got {})",
32541                Self::ENCODED_LEN,
32542                __tmp.remaining(),
32543            )
32544        }
32545        __tmp.put_i32_le(self.safe_return);
32546        __tmp.put_i32_le(self.land);
32547        __tmp.put_i32_le(self.mission_next_item);
32548        __tmp.put_i32_le(self.mission_end);
32549        __tmp.put_i32_le(self.commanded_action);
32550        if matches!(version, MavlinkVersion::V2) {
32551            let len = __tmp.len();
32552            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32553        } else {
32554            __tmp.len()
32555        }
32556    }
32557}
32558#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
32559#[doc = ""]
32560#[doc = "ID: 333"]
32561#[derive(Debug, Clone, PartialEq)]
32562#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32563#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32564#[cfg_attr(feature = "ts", derive(TS))]
32565#[cfg_attr(feature = "ts", ts(export))]
32566pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
32567    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32568    pub time_usec: u64,
32569    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
32570    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32571    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32572    pub pos_x: [f32; 5],
32573    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
32574    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32575    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32576    pub pos_y: [f32; 5],
32577    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
32578    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32579    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32580    pub pos_z: [f32; 5],
32581    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
32582    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32583    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32584    pub delta: [f32; 5],
32585    #[doc = "Yaw. Set to NaN for unchanged"]
32586    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32587    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32588    pub pos_yaw: [f32; 5],
32589    #[doc = "Number of valid control points (up-to 5 points are possible)"]
32590    pub valid_points: u8,
32591}
32592impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
32593    pub const ENCODED_LEN: usize = 109usize;
32594    pub const DEFAULT: Self = Self {
32595        time_usec: 0_u64,
32596        pos_x: [0.0_f32; 5usize],
32597        pos_y: [0.0_f32; 5usize],
32598        pos_z: [0.0_f32; 5usize],
32599        delta: [0.0_f32; 5usize],
32600        pos_yaw: [0.0_f32; 5usize],
32601        valid_points: 0_u8,
32602    };
32603    #[cfg(feature = "arbitrary")]
32604    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32605        use arbitrary::{Arbitrary, Unstructured};
32606        let mut buf = [0u8; 1024];
32607        rng.fill_bytes(&mut buf);
32608        let mut unstructured = Unstructured::new(&buf);
32609        Self::arbitrary(&mut unstructured).unwrap_or_default()
32610    }
32611}
32612impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
32613    fn default() -> Self {
32614        Self::DEFAULT.clone()
32615    }
32616}
32617impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
32618    type Message = MavMessage;
32619    const ID: u32 = 333u32;
32620    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
32621    const EXTRA_CRC: u8 = 231u8;
32622    const ENCODED_LEN: usize = 109usize;
32623    fn deser(
32624        _version: MavlinkVersion,
32625        __input: &[u8],
32626    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32627        let avail_len = __input.len();
32628        let mut payload_buf = [0; Self::ENCODED_LEN];
32629        let mut buf = if avail_len < Self::ENCODED_LEN {
32630            payload_buf[0..avail_len].copy_from_slice(__input);
32631            Bytes::new(&payload_buf)
32632        } else {
32633            Bytes::new(__input)
32634        };
32635        let mut __struct = Self::default();
32636        __struct.time_usec = buf.get_u64_le()?;
32637        for v in &mut __struct.pos_x {
32638            let val = buf.get_f32_le()?;
32639            *v = val;
32640        }
32641        for v in &mut __struct.pos_y {
32642            let val = buf.get_f32_le()?;
32643            *v = val;
32644        }
32645        for v in &mut __struct.pos_z {
32646            let val = buf.get_f32_le()?;
32647            *v = val;
32648        }
32649        for v in &mut __struct.delta {
32650            let val = buf.get_f32_le()?;
32651            *v = val;
32652        }
32653        for v in &mut __struct.pos_yaw {
32654            let val = buf.get_f32_le()?;
32655            *v = val;
32656        }
32657        __struct.valid_points = buf.get_u8()?;
32658        Ok(__struct)
32659    }
32660    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32661        let mut __tmp = BytesMut::new(bytes);
32662        #[allow(clippy::absurd_extreme_comparisons)]
32663        #[allow(unused_comparisons)]
32664        if __tmp.remaining() < Self::ENCODED_LEN {
32665            panic!(
32666                "buffer is too small (need {} bytes, but got {})",
32667                Self::ENCODED_LEN,
32668                __tmp.remaining(),
32669            )
32670        }
32671        __tmp.put_u64_le(self.time_usec);
32672        for val in &self.pos_x {
32673            __tmp.put_f32_le(*val);
32674        }
32675        for val in &self.pos_y {
32676            __tmp.put_f32_le(*val);
32677        }
32678        for val in &self.pos_z {
32679            __tmp.put_f32_le(*val);
32680        }
32681        for val in &self.delta {
32682            __tmp.put_f32_le(*val);
32683        }
32684        for val in &self.pos_yaw {
32685            __tmp.put_f32_le(*val);
32686        }
32687        __tmp.put_u8(self.valid_points);
32688        if matches!(version, MavlinkVersion::V2) {
32689            let len = __tmp.len();
32690            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32691        } else {
32692            __tmp.len()
32693        }
32694    }
32695}
32696#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
32697#[doc = ""]
32698#[doc = "ID: 332"]
32699#[derive(Debug, Clone, PartialEq)]
32700#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32701#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32702#[cfg_attr(feature = "ts", derive(TS))]
32703#[cfg_attr(feature = "ts", ts(export))]
32704pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
32705    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32706    pub time_usec: u64,
32707    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
32708    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32709    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32710    pub pos_x: [f32; 5],
32711    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
32712    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32713    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32714    pub pos_y: [f32; 5],
32715    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
32716    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32717    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32718    pub pos_z: [f32; 5],
32719    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
32720    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32721    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32722    pub vel_x: [f32; 5],
32723    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
32724    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32725    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32726    pub vel_y: [f32; 5],
32727    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
32728    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32729    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32730    pub vel_z: [f32; 5],
32731    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
32732    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32733    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32734    pub acc_x: [f32; 5],
32735    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
32736    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32737    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32738    pub acc_y: [f32; 5],
32739    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
32740    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32741    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32742    pub acc_z: [f32; 5],
32743    #[doc = "Yaw angle, set to NaN if not being used"]
32744    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32745    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32746    pub pos_yaw: [f32; 5],
32747    #[doc = "Yaw rate, set to NaN if not being used"]
32748    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32749    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32750    pub vel_yaw: [f32; 5],
32751    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
32752    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32753    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32754    pub command: [u16; 5],
32755    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
32756    pub valid_points: u8,
32757}
32758impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
32759    pub const ENCODED_LEN: usize = 239usize;
32760    pub const DEFAULT: Self = Self {
32761        time_usec: 0_u64,
32762        pos_x: [0.0_f32; 5usize],
32763        pos_y: [0.0_f32; 5usize],
32764        pos_z: [0.0_f32; 5usize],
32765        vel_x: [0.0_f32; 5usize],
32766        vel_y: [0.0_f32; 5usize],
32767        vel_z: [0.0_f32; 5usize],
32768        acc_x: [0.0_f32; 5usize],
32769        acc_y: [0.0_f32; 5usize],
32770        acc_z: [0.0_f32; 5usize],
32771        pos_yaw: [0.0_f32; 5usize],
32772        vel_yaw: [0.0_f32; 5usize],
32773        command: [0_u16; 5usize],
32774        valid_points: 0_u8,
32775    };
32776    #[cfg(feature = "arbitrary")]
32777    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32778        use arbitrary::{Arbitrary, Unstructured};
32779        let mut buf = [0u8; 1024];
32780        rng.fill_bytes(&mut buf);
32781        let mut unstructured = Unstructured::new(&buf);
32782        Self::arbitrary(&mut unstructured).unwrap_or_default()
32783    }
32784}
32785impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
32786    fn default() -> Self {
32787        Self::DEFAULT.clone()
32788    }
32789}
32790impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
32791    type Message = MavMessage;
32792    const ID: u32 = 332u32;
32793    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
32794    const EXTRA_CRC: u8 = 236u8;
32795    const ENCODED_LEN: usize = 239usize;
32796    fn deser(
32797        _version: MavlinkVersion,
32798        __input: &[u8],
32799    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32800        let avail_len = __input.len();
32801        let mut payload_buf = [0; Self::ENCODED_LEN];
32802        let mut buf = if avail_len < Self::ENCODED_LEN {
32803            payload_buf[0..avail_len].copy_from_slice(__input);
32804            Bytes::new(&payload_buf)
32805        } else {
32806            Bytes::new(__input)
32807        };
32808        let mut __struct = Self::default();
32809        __struct.time_usec = buf.get_u64_le()?;
32810        for v in &mut __struct.pos_x {
32811            let val = buf.get_f32_le()?;
32812            *v = val;
32813        }
32814        for v in &mut __struct.pos_y {
32815            let val = buf.get_f32_le()?;
32816            *v = val;
32817        }
32818        for v in &mut __struct.pos_z {
32819            let val = buf.get_f32_le()?;
32820            *v = val;
32821        }
32822        for v in &mut __struct.vel_x {
32823            let val = buf.get_f32_le()?;
32824            *v = val;
32825        }
32826        for v in &mut __struct.vel_y {
32827            let val = buf.get_f32_le()?;
32828            *v = val;
32829        }
32830        for v in &mut __struct.vel_z {
32831            let val = buf.get_f32_le()?;
32832            *v = val;
32833        }
32834        for v in &mut __struct.acc_x {
32835            let val = buf.get_f32_le()?;
32836            *v = val;
32837        }
32838        for v in &mut __struct.acc_y {
32839            let val = buf.get_f32_le()?;
32840            *v = val;
32841        }
32842        for v in &mut __struct.acc_z {
32843            let val = buf.get_f32_le()?;
32844            *v = val;
32845        }
32846        for v in &mut __struct.pos_yaw {
32847            let val = buf.get_f32_le()?;
32848            *v = val;
32849        }
32850        for v in &mut __struct.vel_yaw {
32851            let val = buf.get_f32_le()?;
32852            *v = val;
32853        }
32854        for v in &mut __struct.command {
32855            let val = buf.get_u16_le()?;
32856            *v = val;
32857        }
32858        __struct.valid_points = buf.get_u8()?;
32859        Ok(__struct)
32860    }
32861    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32862        let mut __tmp = BytesMut::new(bytes);
32863        #[allow(clippy::absurd_extreme_comparisons)]
32864        #[allow(unused_comparisons)]
32865        if __tmp.remaining() < Self::ENCODED_LEN {
32866            panic!(
32867                "buffer is too small (need {} bytes, but got {})",
32868                Self::ENCODED_LEN,
32869                __tmp.remaining(),
32870            )
32871        }
32872        __tmp.put_u64_le(self.time_usec);
32873        for val in &self.pos_x {
32874            __tmp.put_f32_le(*val);
32875        }
32876        for val in &self.pos_y {
32877            __tmp.put_f32_le(*val);
32878        }
32879        for val in &self.pos_z {
32880            __tmp.put_f32_le(*val);
32881        }
32882        for val in &self.vel_x {
32883            __tmp.put_f32_le(*val);
32884        }
32885        for val in &self.vel_y {
32886            __tmp.put_f32_le(*val);
32887        }
32888        for val in &self.vel_z {
32889            __tmp.put_f32_le(*val);
32890        }
32891        for val in &self.acc_x {
32892            __tmp.put_f32_le(*val);
32893        }
32894        for val in &self.acc_y {
32895            __tmp.put_f32_le(*val);
32896        }
32897        for val in &self.acc_z {
32898            __tmp.put_f32_le(*val);
32899        }
32900        for val in &self.pos_yaw {
32901            __tmp.put_f32_le(*val);
32902        }
32903        for val in &self.vel_yaw {
32904            __tmp.put_f32_le(*val);
32905        }
32906        for val in &self.command {
32907            __tmp.put_u16_le(*val);
32908        }
32909        __tmp.put_u8(self.valid_points);
32910        if matches!(version, MavlinkVersion::V2) {
32911            let len = __tmp.len();
32912            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32913        } else {
32914            __tmp.len()
32915        }
32916    }
32917}
32918#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
32919#[doc = ""]
32920#[doc = "ID: 385"]
32921#[derive(Debug, Clone, PartialEq)]
32922#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32923#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32924#[cfg_attr(feature = "ts", derive(TS))]
32925#[cfg_attr(feature = "ts", ts(export))]
32926pub struct TUNNEL_DATA {
32927    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
32928    pub payload_type: MavTunnelPayloadType,
32929    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
32930    pub target_system: u8,
32931    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
32932    pub target_component: u8,
32933    #[doc = "Length of the data transported in payload"]
32934    pub payload_length: u8,
32935    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
32936    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32937    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32938    pub payload: [u8; 128],
32939}
32940impl TUNNEL_DATA {
32941    pub const ENCODED_LEN: usize = 133usize;
32942    pub const DEFAULT: Self = Self {
32943        payload_type: MavTunnelPayloadType::DEFAULT,
32944        target_system: 0_u8,
32945        target_component: 0_u8,
32946        payload_length: 0_u8,
32947        payload: [0_u8; 128usize],
32948    };
32949    #[cfg(feature = "arbitrary")]
32950    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32951        use arbitrary::{Arbitrary, Unstructured};
32952        let mut buf = [0u8; 1024];
32953        rng.fill_bytes(&mut buf);
32954        let mut unstructured = Unstructured::new(&buf);
32955        Self::arbitrary(&mut unstructured).unwrap_or_default()
32956    }
32957}
32958impl Default for TUNNEL_DATA {
32959    fn default() -> Self {
32960        Self::DEFAULT.clone()
32961    }
32962}
32963impl MessageData for TUNNEL_DATA {
32964    type Message = MavMessage;
32965    const ID: u32 = 385u32;
32966    const NAME: &'static str = "TUNNEL";
32967    const EXTRA_CRC: u8 = 147u8;
32968    const ENCODED_LEN: usize = 133usize;
32969    fn deser(
32970        _version: MavlinkVersion,
32971        __input: &[u8],
32972    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32973        let avail_len = __input.len();
32974        let mut payload_buf = [0; Self::ENCODED_LEN];
32975        let mut buf = if avail_len < Self::ENCODED_LEN {
32976            payload_buf[0..avail_len].copy_from_slice(__input);
32977            Bytes::new(&payload_buf)
32978        } else {
32979            Bytes::new(__input)
32980        };
32981        let mut __struct = Self::default();
32982        let tmp = buf.get_u16_le()?;
32983        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
32984            ::mavlink_core::error::ParserError::InvalidEnum {
32985                enum_type: "MavTunnelPayloadType",
32986                value: tmp as u64,
32987            },
32988        )?;
32989        __struct.target_system = buf.get_u8()?;
32990        __struct.target_component = buf.get_u8()?;
32991        __struct.payload_length = buf.get_u8()?;
32992        for v in &mut __struct.payload {
32993            let val = buf.get_u8()?;
32994            *v = val;
32995        }
32996        Ok(__struct)
32997    }
32998    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32999        let mut __tmp = BytesMut::new(bytes);
33000        #[allow(clippy::absurd_extreme_comparisons)]
33001        #[allow(unused_comparisons)]
33002        if __tmp.remaining() < Self::ENCODED_LEN {
33003            panic!(
33004                "buffer is too small (need {} bytes, but got {})",
33005                Self::ENCODED_LEN,
33006                __tmp.remaining(),
33007            )
33008        }
33009        __tmp.put_u16_le(self.payload_type as u16);
33010        __tmp.put_u8(self.target_system);
33011        __tmp.put_u8(self.target_component);
33012        __tmp.put_u8(self.payload_length);
33013        for val in &self.payload {
33014            __tmp.put_u8(*val);
33015        }
33016        if matches!(version, MavlinkVersion::V2) {
33017            let len = __tmp.len();
33018            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33019        } else {
33020            __tmp.len()
33021        }
33022    }
33023}
33024#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
33025#[doc = ""]
33026#[doc = "ID: 311"]
33027#[derive(Debug, Clone, PartialEq)]
33028#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33029#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33030#[cfg_attr(feature = "ts", derive(TS))]
33031#[cfg_attr(feature = "ts", ts(export))]
33032pub struct UAVCAN_NODE_INFO_DATA {
33033    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
33034    pub time_usec: u64,
33035    #[doc = "Time since the start-up of the node."]
33036    pub uptime_sec: u32,
33037    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
33038    pub sw_vcs_commit: u32,
33039    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
33040    #[cfg_attr(feature = "ts", ts(type = "string"))]
33041    pub name: CharArray<80>,
33042    #[doc = "Hardware major version number."]
33043    pub hw_version_major: u8,
33044    #[doc = "Hardware minor version number."]
33045    pub hw_version_minor: u8,
33046    #[doc = "Hardware unique 128-bit ID."]
33047    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33048    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33049    pub hw_unique_id: [u8; 16],
33050    #[doc = "Software major version number."]
33051    pub sw_version_major: u8,
33052    #[doc = "Software minor version number."]
33053    pub sw_version_minor: u8,
33054}
33055impl UAVCAN_NODE_INFO_DATA {
33056    pub const ENCODED_LEN: usize = 116usize;
33057    pub const DEFAULT: Self = Self {
33058        time_usec: 0_u64,
33059        uptime_sec: 0_u32,
33060        sw_vcs_commit: 0_u32,
33061        name: CharArray::new([0_u8; 80usize]),
33062        hw_version_major: 0_u8,
33063        hw_version_minor: 0_u8,
33064        hw_unique_id: [0_u8; 16usize],
33065        sw_version_major: 0_u8,
33066        sw_version_minor: 0_u8,
33067    };
33068    #[cfg(feature = "arbitrary")]
33069    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33070        use arbitrary::{Arbitrary, Unstructured};
33071        let mut buf = [0u8; 1024];
33072        rng.fill_bytes(&mut buf);
33073        let mut unstructured = Unstructured::new(&buf);
33074        Self::arbitrary(&mut unstructured).unwrap_or_default()
33075    }
33076}
33077impl Default for UAVCAN_NODE_INFO_DATA {
33078    fn default() -> Self {
33079        Self::DEFAULT.clone()
33080    }
33081}
33082impl MessageData for UAVCAN_NODE_INFO_DATA {
33083    type Message = MavMessage;
33084    const ID: u32 = 311u32;
33085    const NAME: &'static str = "UAVCAN_NODE_INFO";
33086    const EXTRA_CRC: u8 = 95u8;
33087    const ENCODED_LEN: usize = 116usize;
33088    fn deser(
33089        _version: MavlinkVersion,
33090        __input: &[u8],
33091    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33092        let avail_len = __input.len();
33093        let mut payload_buf = [0; Self::ENCODED_LEN];
33094        let mut buf = if avail_len < Self::ENCODED_LEN {
33095            payload_buf[0..avail_len].copy_from_slice(__input);
33096            Bytes::new(&payload_buf)
33097        } else {
33098            Bytes::new(__input)
33099        };
33100        let mut __struct = Self::default();
33101        __struct.time_usec = buf.get_u64_le()?;
33102        __struct.uptime_sec = buf.get_u32_le()?;
33103        __struct.sw_vcs_commit = buf.get_u32_le()?;
33104        let mut tmp = [0_u8; 80usize];
33105        for v in &mut tmp {
33106            *v = buf.get_u8()?;
33107        }
33108        __struct.name = CharArray::new(tmp);
33109        __struct.hw_version_major = buf.get_u8()?;
33110        __struct.hw_version_minor = buf.get_u8()?;
33111        for v in &mut __struct.hw_unique_id {
33112            let val = buf.get_u8()?;
33113            *v = val;
33114        }
33115        __struct.sw_version_major = buf.get_u8()?;
33116        __struct.sw_version_minor = buf.get_u8()?;
33117        Ok(__struct)
33118    }
33119    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33120        let mut __tmp = BytesMut::new(bytes);
33121        #[allow(clippy::absurd_extreme_comparisons)]
33122        #[allow(unused_comparisons)]
33123        if __tmp.remaining() < Self::ENCODED_LEN {
33124            panic!(
33125                "buffer is too small (need {} bytes, but got {})",
33126                Self::ENCODED_LEN,
33127                __tmp.remaining(),
33128            )
33129        }
33130        __tmp.put_u64_le(self.time_usec);
33131        __tmp.put_u32_le(self.uptime_sec);
33132        __tmp.put_u32_le(self.sw_vcs_commit);
33133        for val in &self.name {
33134            __tmp.put_u8(*val);
33135        }
33136        __tmp.put_u8(self.hw_version_major);
33137        __tmp.put_u8(self.hw_version_minor);
33138        for val in &self.hw_unique_id {
33139            __tmp.put_u8(*val);
33140        }
33141        __tmp.put_u8(self.sw_version_major);
33142        __tmp.put_u8(self.sw_version_minor);
33143        if matches!(version, MavlinkVersion::V2) {
33144            let len = __tmp.len();
33145            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33146        } else {
33147            __tmp.len()
33148        }
33149    }
33150}
33151#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
33152#[doc = ""]
33153#[doc = "ID: 310"]
33154#[derive(Debug, Clone, PartialEq)]
33155#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33156#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33157#[cfg_attr(feature = "ts", derive(TS))]
33158#[cfg_attr(feature = "ts", ts(export))]
33159pub struct UAVCAN_NODE_STATUS_DATA {
33160    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
33161    pub time_usec: u64,
33162    #[doc = "Time since the start-up of the node."]
33163    pub uptime_sec: u32,
33164    #[doc = "Vendor-specific status information."]
33165    pub vendor_specific_status_code: u16,
33166    #[doc = "Generalized node health status."]
33167    pub health: UavcanNodeHealth,
33168    #[doc = "Generalized operating mode."]
33169    pub mode: UavcanNodeMode,
33170    #[doc = "Not used currently."]
33171    pub sub_mode: u8,
33172}
33173impl UAVCAN_NODE_STATUS_DATA {
33174    pub const ENCODED_LEN: usize = 17usize;
33175    pub const DEFAULT: Self = Self {
33176        time_usec: 0_u64,
33177        uptime_sec: 0_u32,
33178        vendor_specific_status_code: 0_u16,
33179        health: UavcanNodeHealth::DEFAULT,
33180        mode: UavcanNodeMode::DEFAULT,
33181        sub_mode: 0_u8,
33182    };
33183    #[cfg(feature = "arbitrary")]
33184    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33185        use arbitrary::{Arbitrary, Unstructured};
33186        let mut buf = [0u8; 1024];
33187        rng.fill_bytes(&mut buf);
33188        let mut unstructured = Unstructured::new(&buf);
33189        Self::arbitrary(&mut unstructured).unwrap_or_default()
33190    }
33191}
33192impl Default for UAVCAN_NODE_STATUS_DATA {
33193    fn default() -> Self {
33194        Self::DEFAULT.clone()
33195    }
33196}
33197impl MessageData for UAVCAN_NODE_STATUS_DATA {
33198    type Message = MavMessage;
33199    const ID: u32 = 310u32;
33200    const NAME: &'static str = "UAVCAN_NODE_STATUS";
33201    const EXTRA_CRC: u8 = 28u8;
33202    const ENCODED_LEN: usize = 17usize;
33203    fn deser(
33204        _version: MavlinkVersion,
33205        __input: &[u8],
33206    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33207        let avail_len = __input.len();
33208        let mut payload_buf = [0; Self::ENCODED_LEN];
33209        let mut buf = if avail_len < Self::ENCODED_LEN {
33210            payload_buf[0..avail_len].copy_from_slice(__input);
33211            Bytes::new(&payload_buf)
33212        } else {
33213            Bytes::new(__input)
33214        };
33215        let mut __struct = Self::default();
33216        __struct.time_usec = buf.get_u64_le()?;
33217        __struct.uptime_sec = buf.get_u32_le()?;
33218        __struct.vendor_specific_status_code = buf.get_u16_le()?;
33219        let tmp = buf.get_u8()?;
33220        __struct.health =
33221            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33222                enum_type: "UavcanNodeHealth",
33223                value: tmp as u64,
33224            })?;
33225        let tmp = buf.get_u8()?;
33226        __struct.mode =
33227            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33228                enum_type: "UavcanNodeMode",
33229                value: tmp as u64,
33230            })?;
33231        __struct.sub_mode = buf.get_u8()?;
33232        Ok(__struct)
33233    }
33234    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33235        let mut __tmp = BytesMut::new(bytes);
33236        #[allow(clippy::absurd_extreme_comparisons)]
33237        #[allow(unused_comparisons)]
33238        if __tmp.remaining() < Self::ENCODED_LEN {
33239            panic!(
33240                "buffer is too small (need {} bytes, but got {})",
33241                Self::ENCODED_LEN,
33242                __tmp.remaining(),
33243            )
33244        }
33245        __tmp.put_u64_le(self.time_usec);
33246        __tmp.put_u32_le(self.uptime_sec);
33247        __tmp.put_u16_le(self.vendor_specific_status_code);
33248        __tmp.put_u8(self.health as u8);
33249        __tmp.put_u8(self.mode as u8);
33250        __tmp.put_u8(self.sub_mode);
33251        if matches!(version, MavlinkVersion::V2) {
33252            let len = __tmp.len();
33253            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33254        } else {
33255            __tmp.len()
33256        }
33257    }
33258}
33259#[doc = "The global position resulting from GPS and sensor fusion."]
33260#[doc = ""]
33261#[doc = "ID: 340"]
33262#[derive(Debug, Clone, PartialEq)]
33263#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33264#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33265#[cfg_attr(feature = "ts", derive(TS))]
33266#[cfg_attr(feature = "ts", ts(export))]
33267pub struct UTM_GLOBAL_POSITION_DATA {
33268    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
33269    pub time: u64,
33270    #[doc = "Latitude (WGS84)"]
33271    pub lat: i32,
33272    #[doc = "Longitude (WGS84)"]
33273    pub lon: i32,
33274    #[doc = "Altitude (WGS84)"]
33275    pub alt: i32,
33276    #[doc = "Altitude above ground"]
33277    pub relative_alt: i32,
33278    #[doc = "Next waypoint, latitude (WGS84)"]
33279    pub next_lat: i32,
33280    #[doc = "Next waypoint, longitude (WGS84)"]
33281    pub next_lon: i32,
33282    #[doc = "Next waypoint, altitude (WGS84)"]
33283    pub next_alt: i32,
33284    #[doc = "Ground X speed (latitude, positive north)"]
33285    pub vx: i16,
33286    #[doc = "Ground Y speed (longitude, positive east)"]
33287    pub vy: i16,
33288    #[doc = "Ground Z speed (altitude, positive down)"]
33289    pub vz: i16,
33290    #[doc = "Horizontal position uncertainty (standard deviation)"]
33291    pub h_acc: u16,
33292    #[doc = "Altitude uncertainty (standard deviation)"]
33293    pub v_acc: u16,
33294    #[doc = "Speed uncertainty (standard deviation)"]
33295    pub vel_acc: u16,
33296    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
33297    pub update_rate: u16,
33298    #[doc = "Unique UAS ID."]
33299    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33300    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33301    pub uas_id: [u8; 18],
33302    #[doc = "Flight state"]
33303    pub flight_state: UtmFlightState,
33304    #[doc = "Bitwise OR combination of the data available flags."]
33305    pub flags: UtmDataAvailFlags,
33306}
33307impl UTM_GLOBAL_POSITION_DATA {
33308    pub const ENCODED_LEN: usize = 70usize;
33309    pub const DEFAULT: Self = Self {
33310        time: 0_u64,
33311        lat: 0_i32,
33312        lon: 0_i32,
33313        alt: 0_i32,
33314        relative_alt: 0_i32,
33315        next_lat: 0_i32,
33316        next_lon: 0_i32,
33317        next_alt: 0_i32,
33318        vx: 0_i16,
33319        vy: 0_i16,
33320        vz: 0_i16,
33321        h_acc: 0_u16,
33322        v_acc: 0_u16,
33323        vel_acc: 0_u16,
33324        update_rate: 0_u16,
33325        uas_id: [0_u8; 18usize],
33326        flight_state: UtmFlightState::DEFAULT,
33327        flags: UtmDataAvailFlags::DEFAULT,
33328    };
33329    #[cfg(feature = "arbitrary")]
33330    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33331        use arbitrary::{Arbitrary, Unstructured};
33332        let mut buf = [0u8; 1024];
33333        rng.fill_bytes(&mut buf);
33334        let mut unstructured = Unstructured::new(&buf);
33335        Self::arbitrary(&mut unstructured).unwrap_or_default()
33336    }
33337}
33338impl Default for UTM_GLOBAL_POSITION_DATA {
33339    fn default() -> Self {
33340        Self::DEFAULT.clone()
33341    }
33342}
33343impl MessageData for UTM_GLOBAL_POSITION_DATA {
33344    type Message = MavMessage;
33345    const ID: u32 = 340u32;
33346    const NAME: &'static str = "UTM_GLOBAL_POSITION";
33347    const EXTRA_CRC: u8 = 99u8;
33348    const ENCODED_LEN: usize = 70usize;
33349    fn deser(
33350        _version: MavlinkVersion,
33351        __input: &[u8],
33352    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33353        let avail_len = __input.len();
33354        let mut payload_buf = [0; Self::ENCODED_LEN];
33355        let mut buf = if avail_len < Self::ENCODED_LEN {
33356            payload_buf[0..avail_len].copy_from_slice(__input);
33357            Bytes::new(&payload_buf)
33358        } else {
33359            Bytes::new(__input)
33360        };
33361        let mut __struct = Self::default();
33362        __struct.time = buf.get_u64_le()?;
33363        __struct.lat = buf.get_i32_le()?;
33364        __struct.lon = buf.get_i32_le()?;
33365        __struct.alt = buf.get_i32_le()?;
33366        __struct.relative_alt = buf.get_i32_le()?;
33367        __struct.next_lat = buf.get_i32_le()?;
33368        __struct.next_lon = buf.get_i32_le()?;
33369        __struct.next_alt = buf.get_i32_le()?;
33370        __struct.vx = buf.get_i16_le()?;
33371        __struct.vy = buf.get_i16_le()?;
33372        __struct.vz = buf.get_i16_le()?;
33373        __struct.h_acc = buf.get_u16_le()?;
33374        __struct.v_acc = buf.get_u16_le()?;
33375        __struct.vel_acc = buf.get_u16_le()?;
33376        __struct.update_rate = buf.get_u16_le()?;
33377        for v in &mut __struct.uas_id {
33378            let val = buf.get_u8()?;
33379            *v = val;
33380        }
33381        let tmp = buf.get_u8()?;
33382        __struct.flight_state =
33383            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33384                enum_type: "UtmFlightState",
33385                value: tmp as u64,
33386            })?;
33387        let tmp = buf.get_u8()?;
33388        __struct.flags = UtmDataAvailFlags::from_bits(tmp as <UtmDataAvailFlags as Flags>::Bits)
33389            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
33390                flag_type: "UtmDataAvailFlags",
33391                value: tmp as u64,
33392            })?;
33393        Ok(__struct)
33394    }
33395    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33396        let mut __tmp = BytesMut::new(bytes);
33397        #[allow(clippy::absurd_extreme_comparisons)]
33398        #[allow(unused_comparisons)]
33399        if __tmp.remaining() < Self::ENCODED_LEN {
33400            panic!(
33401                "buffer is too small (need {} bytes, but got {})",
33402                Self::ENCODED_LEN,
33403                __tmp.remaining(),
33404            )
33405        }
33406        __tmp.put_u64_le(self.time);
33407        __tmp.put_i32_le(self.lat);
33408        __tmp.put_i32_le(self.lon);
33409        __tmp.put_i32_le(self.alt);
33410        __tmp.put_i32_le(self.relative_alt);
33411        __tmp.put_i32_le(self.next_lat);
33412        __tmp.put_i32_le(self.next_lon);
33413        __tmp.put_i32_le(self.next_alt);
33414        __tmp.put_i16_le(self.vx);
33415        __tmp.put_i16_le(self.vy);
33416        __tmp.put_i16_le(self.vz);
33417        __tmp.put_u16_le(self.h_acc);
33418        __tmp.put_u16_le(self.v_acc);
33419        __tmp.put_u16_le(self.vel_acc);
33420        __tmp.put_u16_le(self.update_rate);
33421        for val in &self.uas_id {
33422            __tmp.put_u8(*val);
33423        }
33424        __tmp.put_u8(self.flight_state as u8);
33425        __tmp.put_u8(self.flags.bits() as u8);
33426        if matches!(version, MavlinkVersion::V2) {
33427            let len = __tmp.len();
33428            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33429        } else {
33430            __tmp.len()
33431        }
33432    }
33433}
33434#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
33435#[doc = ""]
33436#[doc = "ID: 248"]
33437#[derive(Debug, Clone, PartialEq)]
33438#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33439#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33440#[cfg_attr(feature = "ts", derive(TS))]
33441#[cfg_attr(feature = "ts", ts(export))]
33442pub struct V2_EXTENSION_DATA {
33443    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
33444    pub message_type: u16,
33445    #[doc = "Network ID (0 for broadcast)"]
33446    pub target_network: u8,
33447    #[doc = "System ID (0 for broadcast)"]
33448    pub target_system: u8,
33449    #[doc = "Component ID (0 for broadcast)"]
33450    pub target_component: u8,
33451    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
33452    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33453    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33454    pub payload: [u8; 249],
33455}
33456impl V2_EXTENSION_DATA {
33457    pub const ENCODED_LEN: usize = 254usize;
33458    pub const DEFAULT: Self = Self {
33459        message_type: 0_u16,
33460        target_network: 0_u8,
33461        target_system: 0_u8,
33462        target_component: 0_u8,
33463        payload: [0_u8; 249usize],
33464    };
33465    #[cfg(feature = "arbitrary")]
33466    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33467        use arbitrary::{Arbitrary, Unstructured};
33468        let mut buf = [0u8; 1024];
33469        rng.fill_bytes(&mut buf);
33470        let mut unstructured = Unstructured::new(&buf);
33471        Self::arbitrary(&mut unstructured).unwrap_or_default()
33472    }
33473}
33474impl Default for V2_EXTENSION_DATA {
33475    fn default() -> Self {
33476        Self::DEFAULT.clone()
33477    }
33478}
33479impl MessageData for V2_EXTENSION_DATA {
33480    type Message = MavMessage;
33481    const ID: u32 = 248u32;
33482    const NAME: &'static str = "V2_EXTENSION";
33483    const EXTRA_CRC: u8 = 8u8;
33484    const ENCODED_LEN: usize = 254usize;
33485    fn deser(
33486        _version: MavlinkVersion,
33487        __input: &[u8],
33488    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33489        let avail_len = __input.len();
33490        let mut payload_buf = [0; Self::ENCODED_LEN];
33491        let mut buf = if avail_len < Self::ENCODED_LEN {
33492            payload_buf[0..avail_len].copy_from_slice(__input);
33493            Bytes::new(&payload_buf)
33494        } else {
33495            Bytes::new(__input)
33496        };
33497        let mut __struct = Self::default();
33498        __struct.message_type = buf.get_u16_le()?;
33499        __struct.target_network = buf.get_u8()?;
33500        __struct.target_system = buf.get_u8()?;
33501        __struct.target_component = buf.get_u8()?;
33502        for v in &mut __struct.payload {
33503            let val = buf.get_u8()?;
33504            *v = val;
33505        }
33506        Ok(__struct)
33507    }
33508    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33509        let mut __tmp = BytesMut::new(bytes);
33510        #[allow(clippy::absurd_extreme_comparisons)]
33511        #[allow(unused_comparisons)]
33512        if __tmp.remaining() < Self::ENCODED_LEN {
33513            panic!(
33514                "buffer is too small (need {} bytes, but got {})",
33515                Self::ENCODED_LEN,
33516                __tmp.remaining(),
33517            )
33518        }
33519        __tmp.put_u16_le(self.message_type);
33520        __tmp.put_u8(self.target_network);
33521        __tmp.put_u8(self.target_system);
33522        __tmp.put_u8(self.target_component);
33523        for val in &self.payload {
33524            __tmp.put_u8(*val);
33525        }
33526        if matches!(version, MavlinkVersion::V2) {
33527            let len = __tmp.len();
33528            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33529        } else {
33530            __tmp.len()
33531        }
33532    }
33533}
33534#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
33535#[doc = ""]
33536#[doc = "ID: 74"]
33537#[derive(Debug, Clone, PartialEq)]
33538#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33539#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33540#[cfg_attr(feature = "ts", derive(TS))]
33541#[cfg_attr(feature = "ts", ts(export))]
33542pub struct VFR_HUD_DATA {
33543    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
33544    pub airspeed: f32,
33545    #[doc = "Current ground speed."]
33546    pub groundspeed: f32,
33547    #[doc = "Current altitude (MSL)."]
33548    pub alt: f32,
33549    #[doc = "Current climb rate."]
33550    pub climb: f32,
33551    #[doc = "Current heading in compass units (0-360, 0=north)."]
33552    pub heading: i16,
33553    #[doc = "Current throttle setting (0 to 100)."]
33554    pub throttle: u16,
33555}
33556impl VFR_HUD_DATA {
33557    pub const ENCODED_LEN: usize = 20usize;
33558    pub const DEFAULT: Self = Self {
33559        airspeed: 0.0_f32,
33560        groundspeed: 0.0_f32,
33561        alt: 0.0_f32,
33562        climb: 0.0_f32,
33563        heading: 0_i16,
33564        throttle: 0_u16,
33565    };
33566    #[cfg(feature = "arbitrary")]
33567    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33568        use arbitrary::{Arbitrary, Unstructured};
33569        let mut buf = [0u8; 1024];
33570        rng.fill_bytes(&mut buf);
33571        let mut unstructured = Unstructured::new(&buf);
33572        Self::arbitrary(&mut unstructured).unwrap_or_default()
33573    }
33574}
33575impl Default for VFR_HUD_DATA {
33576    fn default() -> Self {
33577        Self::DEFAULT.clone()
33578    }
33579}
33580impl MessageData for VFR_HUD_DATA {
33581    type Message = MavMessage;
33582    const ID: u32 = 74u32;
33583    const NAME: &'static str = "VFR_HUD";
33584    const EXTRA_CRC: u8 = 20u8;
33585    const ENCODED_LEN: usize = 20usize;
33586    fn deser(
33587        _version: MavlinkVersion,
33588        __input: &[u8],
33589    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33590        let avail_len = __input.len();
33591        let mut payload_buf = [0; Self::ENCODED_LEN];
33592        let mut buf = if avail_len < Self::ENCODED_LEN {
33593            payload_buf[0..avail_len].copy_from_slice(__input);
33594            Bytes::new(&payload_buf)
33595        } else {
33596            Bytes::new(__input)
33597        };
33598        let mut __struct = Self::default();
33599        __struct.airspeed = buf.get_f32_le()?;
33600        __struct.groundspeed = buf.get_f32_le()?;
33601        __struct.alt = buf.get_f32_le()?;
33602        __struct.climb = buf.get_f32_le()?;
33603        __struct.heading = buf.get_i16_le()?;
33604        __struct.throttle = buf.get_u16_le()?;
33605        Ok(__struct)
33606    }
33607    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33608        let mut __tmp = BytesMut::new(bytes);
33609        #[allow(clippy::absurd_extreme_comparisons)]
33610        #[allow(unused_comparisons)]
33611        if __tmp.remaining() < Self::ENCODED_LEN {
33612            panic!(
33613                "buffer is too small (need {} bytes, but got {})",
33614                Self::ENCODED_LEN,
33615                __tmp.remaining(),
33616            )
33617        }
33618        __tmp.put_f32_le(self.airspeed);
33619        __tmp.put_f32_le(self.groundspeed);
33620        __tmp.put_f32_le(self.alt);
33621        __tmp.put_f32_le(self.climb);
33622        __tmp.put_i16_le(self.heading);
33623        __tmp.put_u16_le(self.throttle);
33624        if matches!(version, MavlinkVersion::V2) {
33625            let len = __tmp.len();
33626            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33627        } else {
33628            __tmp.len()
33629        }
33630    }
33631}
33632#[doc = "Vibration levels and accelerometer clipping."]
33633#[doc = ""]
33634#[doc = "ID: 241"]
33635#[derive(Debug, Clone, PartialEq)]
33636#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33637#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33638#[cfg_attr(feature = "ts", derive(TS))]
33639#[cfg_attr(feature = "ts", ts(export))]
33640pub struct VIBRATION_DATA {
33641    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
33642    pub time_usec: u64,
33643    #[doc = "Vibration levels on X-axis"]
33644    pub vibration_x: f32,
33645    #[doc = "Vibration levels on Y-axis"]
33646    pub vibration_y: f32,
33647    #[doc = "Vibration levels on Z-axis"]
33648    pub vibration_z: f32,
33649    #[doc = "first accelerometer clipping count"]
33650    pub clipping_0: u32,
33651    #[doc = "second accelerometer clipping count"]
33652    pub clipping_1: u32,
33653    #[doc = "third accelerometer clipping count"]
33654    pub clipping_2: u32,
33655}
33656impl VIBRATION_DATA {
33657    pub const ENCODED_LEN: usize = 32usize;
33658    pub const DEFAULT: Self = Self {
33659        time_usec: 0_u64,
33660        vibration_x: 0.0_f32,
33661        vibration_y: 0.0_f32,
33662        vibration_z: 0.0_f32,
33663        clipping_0: 0_u32,
33664        clipping_1: 0_u32,
33665        clipping_2: 0_u32,
33666    };
33667    #[cfg(feature = "arbitrary")]
33668    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33669        use arbitrary::{Arbitrary, Unstructured};
33670        let mut buf = [0u8; 1024];
33671        rng.fill_bytes(&mut buf);
33672        let mut unstructured = Unstructured::new(&buf);
33673        Self::arbitrary(&mut unstructured).unwrap_or_default()
33674    }
33675}
33676impl Default for VIBRATION_DATA {
33677    fn default() -> Self {
33678        Self::DEFAULT.clone()
33679    }
33680}
33681impl MessageData for VIBRATION_DATA {
33682    type Message = MavMessage;
33683    const ID: u32 = 241u32;
33684    const NAME: &'static str = "VIBRATION";
33685    const EXTRA_CRC: u8 = 90u8;
33686    const ENCODED_LEN: usize = 32usize;
33687    fn deser(
33688        _version: MavlinkVersion,
33689        __input: &[u8],
33690    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33691        let avail_len = __input.len();
33692        let mut payload_buf = [0; Self::ENCODED_LEN];
33693        let mut buf = if avail_len < Self::ENCODED_LEN {
33694            payload_buf[0..avail_len].copy_from_slice(__input);
33695            Bytes::new(&payload_buf)
33696        } else {
33697            Bytes::new(__input)
33698        };
33699        let mut __struct = Self::default();
33700        __struct.time_usec = buf.get_u64_le()?;
33701        __struct.vibration_x = buf.get_f32_le()?;
33702        __struct.vibration_y = buf.get_f32_le()?;
33703        __struct.vibration_z = buf.get_f32_le()?;
33704        __struct.clipping_0 = buf.get_u32_le()?;
33705        __struct.clipping_1 = buf.get_u32_le()?;
33706        __struct.clipping_2 = buf.get_u32_le()?;
33707        Ok(__struct)
33708    }
33709    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33710        let mut __tmp = BytesMut::new(bytes);
33711        #[allow(clippy::absurd_extreme_comparisons)]
33712        #[allow(unused_comparisons)]
33713        if __tmp.remaining() < Self::ENCODED_LEN {
33714            panic!(
33715                "buffer is too small (need {} bytes, but got {})",
33716                Self::ENCODED_LEN,
33717                __tmp.remaining(),
33718            )
33719        }
33720        __tmp.put_u64_le(self.time_usec);
33721        __tmp.put_f32_le(self.vibration_x);
33722        __tmp.put_f32_le(self.vibration_y);
33723        __tmp.put_f32_le(self.vibration_z);
33724        __tmp.put_u32_le(self.clipping_0);
33725        __tmp.put_u32_le(self.clipping_1);
33726        __tmp.put_u32_le(self.clipping_2);
33727        if matches!(version, MavlinkVersion::V2) {
33728            let len = __tmp.len();
33729            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33730        } else {
33731            __tmp.len()
33732        }
33733    }
33734}
33735#[doc = "Global position estimate from a Vicon motion system source."]
33736#[doc = ""]
33737#[doc = "ID: 104"]
33738#[derive(Debug, Clone, PartialEq)]
33739#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33740#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33741#[cfg_attr(feature = "ts", derive(TS))]
33742#[cfg_attr(feature = "ts", ts(export))]
33743pub struct VICON_POSITION_ESTIMATE_DATA {
33744    #[doc = "Timestamp (UNIX time or time since system boot)"]
33745    pub usec: u64,
33746    #[doc = "Global X position"]
33747    pub x: f32,
33748    #[doc = "Global Y position"]
33749    pub y: f32,
33750    #[doc = "Global Z position"]
33751    pub z: f32,
33752    #[doc = "Roll angle"]
33753    pub roll: f32,
33754    #[doc = "Pitch angle"]
33755    pub pitch: f32,
33756    #[doc = "Yaw angle"]
33757    pub yaw: f32,
33758    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
33759    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33760    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33761    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33762    pub covariance: [f32; 21],
33763}
33764impl VICON_POSITION_ESTIMATE_DATA {
33765    pub const ENCODED_LEN: usize = 116usize;
33766    pub const DEFAULT: Self = Self {
33767        usec: 0_u64,
33768        x: 0.0_f32,
33769        y: 0.0_f32,
33770        z: 0.0_f32,
33771        roll: 0.0_f32,
33772        pitch: 0.0_f32,
33773        yaw: 0.0_f32,
33774        covariance: [0.0_f32; 21usize],
33775    };
33776    #[cfg(feature = "arbitrary")]
33777    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33778        use arbitrary::{Arbitrary, Unstructured};
33779        let mut buf = [0u8; 1024];
33780        rng.fill_bytes(&mut buf);
33781        let mut unstructured = Unstructured::new(&buf);
33782        Self::arbitrary(&mut unstructured).unwrap_or_default()
33783    }
33784}
33785impl Default for VICON_POSITION_ESTIMATE_DATA {
33786    fn default() -> Self {
33787        Self::DEFAULT.clone()
33788    }
33789}
33790impl MessageData for VICON_POSITION_ESTIMATE_DATA {
33791    type Message = MavMessage;
33792    const ID: u32 = 104u32;
33793    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
33794    const EXTRA_CRC: u8 = 56u8;
33795    const ENCODED_LEN: usize = 116usize;
33796    fn deser(
33797        _version: MavlinkVersion,
33798        __input: &[u8],
33799    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33800        let avail_len = __input.len();
33801        let mut payload_buf = [0; Self::ENCODED_LEN];
33802        let mut buf = if avail_len < Self::ENCODED_LEN {
33803            payload_buf[0..avail_len].copy_from_slice(__input);
33804            Bytes::new(&payload_buf)
33805        } else {
33806            Bytes::new(__input)
33807        };
33808        let mut __struct = Self::default();
33809        __struct.usec = buf.get_u64_le()?;
33810        __struct.x = buf.get_f32_le()?;
33811        __struct.y = buf.get_f32_le()?;
33812        __struct.z = buf.get_f32_le()?;
33813        __struct.roll = buf.get_f32_le()?;
33814        __struct.pitch = buf.get_f32_le()?;
33815        __struct.yaw = buf.get_f32_le()?;
33816        for v in &mut __struct.covariance {
33817            let val = buf.get_f32_le()?;
33818            *v = val;
33819        }
33820        Ok(__struct)
33821    }
33822    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33823        let mut __tmp = BytesMut::new(bytes);
33824        #[allow(clippy::absurd_extreme_comparisons)]
33825        #[allow(unused_comparisons)]
33826        if __tmp.remaining() < Self::ENCODED_LEN {
33827            panic!(
33828                "buffer is too small (need {} bytes, but got {})",
33829                Self::ENCODED_LEN,
33830                __tmp.remaining(),
33831            )
33832        }
33833        __tmp.put_u64_le(self.usec);
33834        __tmp.put_f32_le(self.x);
33835        __tmp.put_f32_le(self.y);
33836        __tmp.put_f32_le(self.z);
33837        __tmp.put_f32_le(self.roll);
33838        __tmp.put_f32_le(self.pitch);
33839        __tmp.put_f32_le(self.yaw);
33840        if matches!(version, MavlinkVersion::V2) {
33841            for val in &self.covariance {
33842                __tmp.put_f32_le(*val);
33843            }
33844            let len = __tmp.len();
33845            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33846        } else {
33847            __tmp.len()
33848        }
33849    }
33850}
33851#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
33852#[doc = ""]
33853#[doc = "ID: 269"]
33854#[derive(Debug, Clone, PartialEq)]
33855#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33856#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33857#[cfg_attr(feature = "ts", derive(TS))]
33858#[cfg_attr(feature = "ts", ts(export))]
33859pub struct VIDEO_STREAM_INFORMATION_DATA {
33860    #[doc = "Frame rate."]
33861    pub framerate: f32,
33862    #[doc = "Bit rate."]
33863    pub bitrate: u32,
33864    #[doc = "Bitmap of stream status flags."]
33865    pub flags: VideoStreamStatusFlags,
33866    #[doc = "Horizontal resolution."]
33867    pub resolution_h: u16,
33868    #[doc = "Vertical resolution."]
33869    pub resolution_v: u16,
33870    #[doc = "Video image rotation clockwise."]
33871    pub rotation: u16,
33872    #[doc = "Horizontal Field of view."]
33873    pub hfov: u16,
33874    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
33875    pub stream_id: u8,
33876    #[doc = "Number of streams available."]
33877    pub count: u8,
33878    #[doc = "Type of stream."]
33879    pub mavtype: VideoStreamType,
33880    #[doc = "Stream name."]
33881    #[cfg_attr(feature = "ts", ts(type = "string"))]
33882    pub name: CharArray<32>,
33883    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
33884    #[cfg_attr(feature = "ts", ts(type = "string"))]
33885    pub uri: CharArray<160>,
33886    #[doc = "Encoding of stream."]
33887    #[cfg_attr(feature = "serde", serde(default))]
33888    pub encoding: VideoStreamEncoding,
33889    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
33890    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33891    pub camera_device_id: u8,
33892}
33893impl VIDEO_STREAM_INFORMATION_DATA {
33894    pub const ENCODED_LEN: usize = 215usize;
33895    pub const DEFAULT: Self = Self {
33896        framerate: 0.0_f32,
33897        bitrate: 0_u32,
33898        flags: VideoStreamStatusFlags::DEFAULT,
33899        resolution_h: 0_u16,
33900        resolution_v: 0_u16,
33901        rotation: 0_u16,
33902        hfov: 0_u16,
33903        stream_id: 0_u8,
33904        count: 0_u8,
33905        mavtype: VideoStreamType::DEFAULT,
33906        name: CharArray::new([0_u8; 32usize]),
33907        uri: CharArray::new([0_u8; 160usize]),
33908        encoding: VideoStreamEncoding::DEFAULT,
33909        camera_device_id: 0_u8,
33910    };
33911    #[cfg(feature = "arbitrary")]
33912    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33913        use arbitrary::{Arbitrary, Unstructured};
33914        let mut buf = [0u8; 1024];
33915        rng.fill_bytes(&mut buf);
33916        let mut unstructured = Unstructured::new(&buf);
33917        Self::arbitrary(&mut unstructured).unwrap_or_default()
33918    }
33919}
33920impl Default for VIDEO_STREAM_INFORMATION_DATA {
33921    fn default() -> Self {
33922        Self::DEFAULT.clone()
33923    }
33924}
33925impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
33926    type Message = MavMessage;
33927    const ID: u32 = 269u32;
33928    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
33929    const EXTRA_CRC: u8 = 109u8;
33930    const ENCODED_LEN: usize = 215usize;
33931    fn deser(
33932        _version: MavlinkVersion,
33933        __input: &[u8],
33934    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33935        let avail_len = __input.len();
33936        let mut payload_buf = [0; Self::ENCODED_LEN];
33937        let mut buf = if avail_len < Self::ENCODED_LEN {
33938            payload_buf[0..avail_len].copy_from_slice(__input);
33939            Bytes::new(&payload_buf)
33940        } else {
33941            Bytes::new(__input)
33942        };
33943        let mut __struct = Self::default();
33944        __struct.framerate = buf.get_f32_le()?;
33945        __struct.bitrate = buf.get_u32_le()?;
33946        let tmp = buf.get_u16_le()?;
33947        __struct.flags =
33948            VideoStreamStatusFlags::from_bits(tmp as <VideoStreamStatusFlags as Flags>::Bits)
33949                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
33950                    flag_type: "VideoStreamStatusFlags",
33951                    value: tmp as u64,
33952                })?;
33953        __struct.resolution_h = buf.get_u16_le()?;
33954        __struct.resolution_v = buf.get_u16_le()?;
33955        __struct.rotation = buf.get_u16_le()?;
33956        __struct.hfov = buf.get_u16_le()?;
33957        __struct.stream_id = buf.get_u8()?;
33958        __struct.count = buf.get_u8()?;
33959        let tmp = buf.get_u8()?;
33960        __struct.mavtype =
33961            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33962                enum_type: "VideoStreamType",
33963                value: tmp as u64,
33964            })?;
33965        let mut tmp = [0_u8; 32usize];
33966        for v in &mut tmp {
33967            *v = buf.get_u8()?;
33968        }
33969        __struct.name = CharArray::new(tmp);
33970        let mut tmp = [0_u8; 160usize];
33971        for v in &mut tmp {
33972            *v = buf.get_u8()?;
33973        }
33974        __struct.uri = CharArray::new(tmp);
33975        let tmp = buf.get_u8()?;
33976        __struct.encoding =
33977            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33978                enum_type: "VideoStreamEncoding",
33979                value: tmp as u64,
33980            })?;
33981        __struct.camera_device_id = buf.get_u8()?;
33982        Ok(__struct)
33983    }
33984    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33985        let mut __tmp = BytesMut::new(bytes);
33986        #[allow(clippy::absurd_extreme_comparisons)]
33987        #[allow(unused_comparisons)]
33988        if __tmp.remaining() < Self::ENCODED_LEN {
33989            panic!(
33990                "buffer is too small (need {} bytes, but got {})",
33991                Self::ENCODED_LEN,
33992                __tmp.remaining(),
33993            )
33994        }
33995        __tmp.put_f32_le(self.framerate);
33996        __tmp.put_u32_le(self.bitrate);
33997        __tmp.put_u16_le(self.flags.bits() as u16);
33998        __tmp.put_u16_le(self.resolution_h);
33999        __tmp.put_u16_le(self.resolution_v);
34000        __tmp.put_u16_le(self.rotation);
34001        __tmp.put_u16_le(self.hfov);
34002        __tmp.put_u8(self.stream_id);
34003        __tmp.put_u8(self.count);
34004        __tmp.put_u8(self.mavtype as u8);
34005        for val in &self.name {
34006            __tmp.put_u8(*val);
34007        }
34008        for val in &self.uri {
34009            __tmp.put_u8(*val);
34010        }
34011        if matches!(version, MavlinkVersion::V2) {
34012            __tmp.put_u8(self.encoding as u8);
34013            __tmp.put_u8(self.camera_device_id);
34014            let len = __tmp.len();
34015            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34016        } else {
34017            __tmp.len()
34018        }
34019    }
34020}
34021#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
34022#[doc = ""]
34023#[doc = "ID: 270"]
34024#[derive(Debug, Clone, PartialEq)]
34025#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34026#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34027#[cfg_attr(feature = "ts", derive(TS))]
34028#[cfg_attr(feature = "ts", ts(export))]
34029pub struct VIDEO_STREAM_STATUS_DATA {
34030    #[doc = "Frame rate"]
34031    pub framerate: f32,
34032    #[doc = "Bit rate"]
34033    pub bitrate: u32,
34034    #[doc = "Bitmap of stream status flags"]
34035    pub flags: VideoStreamStatusFlags,
34036    #[doc = "Horizontal resolution"]
34037    pub resolution_h: u16,
34038    #[doc = "Vertical resolution"]
34039    pub resolution_v: u16,
34040    #[doc = "Video image rotation clockwise"]
34041    pub rotation: u16,
34042    #[doc = "Horizontal Field of view"]
34043    pub hfov: u16,
34044    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
34045    pub stream_id: u8,
34046    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
34047    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
34048    pub camera_device_id: u8,
34049}
34050impl VIDEO_STREAM_STATUS_DATA {
34051    pub const ENCODED_LEN: usize = 20usize;
34052    pub const DEFAULT: Self = Self {
34053        framerate: 0.0_f32,
34054        bitrate: 0_u32,
34055        flags: VideoStreamStatusFlags::DEFAULT,
34056        resolution_h: 0_u16,
34057        resolution_v: 0_u16,
34058        rotation: 0_u16,
34059        hfov: 0_u16,
34060        stream_id: 0_u8,
34061        camera_device_id: 0_u8,
34062    };
34063    #[cfg(feature = "arbitrary")]
34064    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34065        use arbitrary::{Arbitrary, Unstructured};
34066        let mut buf = [0u8; 1024];
34067        rng.fill_bytes(&mut buf);
34068        let mut unstructured = Unstructured::new(&buf);
34069        Self::arbitrary(&mut unstructured).unwrap_or_default()
34070    }
34071}
34072impl Default for VIDEO_STREAM_STATUS_DATA {
34073    fn default() -> Self {
34074        Self::DEFAULT.clone()
34075    }
34076}
34077impl MessageData for VIDEO_STREAM_STATUS_DATA {
34078    type Message = MavMessage;
34079    const ID: u32 = 270u32;
34080    const NAME: &'static str = "VIDEO_STREAM_STATUS";
34081    const EXTRA_CRC: u8 = 59u8;
34082    const ENCODED_LEN: usize = 20usize;
34083    fn deser(
34084        _version: MavlinkVersion,
34085        __input: &[u8],
34086    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34087        let avail_len = __input.len();
34088        let mut payload_buf = [0; Self::ENCODED_LEN];
34089        let mut buf = if avail_len < Self::ENCODED_LEN {
34090            payload_buf[0..avail_len].copy_from_slice(__input);
34091            Bytes::new(&payload_buf)
34092        } else {
34093            Bytes::new(__input)
34094        };
34095        let mut __struct = Self::default();
34096        __struct.framerate = buf.get_f32_le()?;
34097        __struct.bitrate = buf.get_u32_le()?;
34098        let tmp = buf.get_u16_le()?;
34099        __struct.flags =
34100            VideoStreamStatusFlags::from_bits(tmp as <VideoStreamStatusFlags as Flags>::Bits)
34101                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
34102                    flag_type: "VideoStreamStatusFlags",
34103                    value: tmp as u64,
34104                })?;
34105        __struct.resolution_h = buf.get_u16_le()?;
34106        __struct.resolution_v = buf.get_u16_le()?;
34107        __struct.rotation = buf.get_u16_le()?;
34108        __struct.hfov = buf.get_u16_le()?;
34109        __struct.stream_id = buf.get_u8()?;
34110        __struct.camera_device_id = buf.get_u8()?;
34111        Ok(__struct)
34112    }
34113    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34114        let mut __tmp = BytesMut::new(bytes);
34115        #[allow(clippy::absurd_extreme_comparisons)]
34116        #[allow(unused_comparisons)]
34117        if __tmp.remaining() < Self::ENCODED_LEN {
34118            panic!(
34119                "buffer is too small (need {} bytes, but got {})",
34120                Self::ENCODED_LEN,
34121                __tmp.remaining(),
34122            )
34123        }
34124        __tmp.put_f32_le(self.framerate);
34125        __tmp.put_u32_le(self.bitrate);
34126        __tmp.put_u16_le(self.flags.bits() as u16);
34127        __tmp.put_u16_le(self.resolution_h);
34128        __tmp.put_u16_le(self.resolution_v);
34129        __tmp.put_u16_le(self.rotation);
34130        __tmp.put_u16_le(self.hfov);
34131        __tmp.put_u8(self.stream_id);
34132        if matches!(version, MavlinkVersion::V2) {
34133            __tmp.put_u8(self.camera_device_id);
34134            let len = __tmp.len();
34135            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34136        } else {
34137            __tmp.len()
34138        }
34139    }
34140}
34141#[doc = "Local position/attitude estimate from a vision source."]
34142#[doc = ""]
34143#[doc = "ID: 102"]
34144#[derive(Debug, Clone, PartialEq)]
34145#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34146#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34147#[cfg_attr(feature = "ts", derive(TS))]
34148#[cfg_attr(feature = "ts", ts(export))]
34149pub struct VISION_POSITION_ESTIMATE_DATA {
34150    #[doc = "Timestamp (UNIX time or time since system boot)"]
34151    pub usec: u64,
34152    #[doc = "Local X position"]
34153    pub x: f32,
34154    #[doc = "Local Y position"]
34155    pub y: f32,
34156    #[doc = "Local Z position"]
34157    pub z: f32,
34158    #[doc = "Roll angle"]
34159    pub roll: f32,
34160    #[doc = "Pitch angle"]
34161    pub pitch: f32,
34162    #[doc = "Yaw angle"]
34163    pub yaw: f32,
34164    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
34165    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
34166    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
34167    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
34168    pub covariance: [f32; 21],
34169    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
34170    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
34171    pub reset_counter: u8,
34172}
34173impl VISION_POSITION_ESTIMATE_DATA {
34174    pub const ENCODED_LEN: usize = 117usize;
34175    pub const DEFAULT: Self = Self {
34176        usec: 0_u64,
34177        x: 0.0_f32,
34178        y: 0.0_f32,
34179        z: 0.0_f32,
34180        roll: 0.0_f32,
34181        pitch: 0.0_f32,
34182        yaw: 0.0_f32,
34183        covariance: [0.0_f32; 21usize],
34184        reset_counter: 0_u8,
34185    };
34186    #[cfg(feature = "arbitrary")]
34187    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34188        use arbitrary::{Arbitrary, Unstructured};
34189        let mut buf = [0u8; 1024];
34190        rng.fill_bytes(&mut buf);
34191        let mut unstructured = Unstructured::new(&buf);
34192        Self::arbitrary(&mut unstructured).unwrap_or_default()
34193    }
34194}
34195impl Default for VISION_POSITION_ESTIMATE_DATA {
34196    fn default() -> Self {
34197        Self::DEFAULT.clone()
34198    }
34199}
34200impl MessageData for VISION_POSITION_ESTIMATE_DATA {
34201    type Message = MavMessage;
34202    const ID: u32 = 102u32;
34203    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
34204    const EXTRA_CRC: u8 = 158u8;
34205    const ENCODED_LEN: usize = 117usize;
34206    fn deser(
34207        _version: MavlinkVersion,
34208        __input: &[u8],
34209    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34210        let avail_len = __input.len();
34211        let mut payload_buf = [0; Self::ENCODED_LEN];
34212        let mut buf = if avail_len < Self::ENCODED_LEN {
34213            payload_buf[0..avail_len].copy_from_slice(__input);
34214            Bytes::new(&payload_buf)
34215        } else {
34216            Bytes::new(__input)
34217        };
34218        let mut __struct = Self::default();
34219        __struct.usec = buf.get_u64_le()?;
34220        __struct.x = buf.get_f32_le()?;
34221        __struct.y = buf.get_f32_le()?;
34222        __struct.z = buf.get_f32_le()?;
34223        __struct.roll = buf.get_f32_le()?;
34224        __struct.pitch = buf.get_f32_le()?;
34225        __struct.yaw = buf.get_f32_le()?;
34226        for v in &mut __struct.covariance {
34227            let val = buf.get_f32_le()?;
34228            *v = val;
34229        }
34230        __struct.reset_counter = buf.get_u8()?;
34231        Ok(__struct)
34232    }
34233    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34234        let mut __tmp = BytesMut::new(bytes);
34235        #[allow(clippy::absurd_extreme_comparisons)]
34236        #[allow(unused_comparisons)]
34237        if __tmp.remaining() < Self::ENCODED_LEN {
34238            panic!(
34239                "buffer is too small (need {} bytes, but got {})",
34240                Self::ENCODED_LEN,
34241                __tmp.remaining(),
34242            )
34243        }
34244        __tmp.put_u64_le(self.usec);
34245        __tmp.put_f32_le(self.x);
34246        __tmp.put_f32_le(self.y);
34247        __tmp.put_f32_le(self.z);
34248        __tmp.put_f32_le(self.roll);
34249        __tmp.put_f32_le(self.pitch);
34250        __tmp.put_f32_le(self.yaw);
34251        if matches!(version, MavlinkVersion::V2) {
34252            for val in &self.covariance {
34253                __tmp.put_f32_le(*val);
34254            }
34255            __tmp.put_u8(self.reset_counter);
34256            let len = __tmp.len();
34257            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34258        } else {
34259            __tmp.len()
34260        }
34261    }
34262}
34263#[doc = "Speed estimate from a vision source."]
34264#[doc = ""]
34265#[doc = "ID: 103"]
34266#[derive(Debug, Clone, PartialEq)]
34267#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34268#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34269#[cfg_attr(feature = "ts", derive(TS))]
34270#[cfg_attr(feature = "ts", ts(export))]
34271pub struct VISION_SPEED_ESTIMATE_DATA {
34272    #[doc = "Timestamp (UNIX time or time since system boot)"]
34273    pub usec: u64,
34274    #[doc = "Global X speed"]
34275    pub x: f32,
34276    #[doc = "Global Y speed"]
34277    pub y: f32,
34278    #[doc = "Global Z speed"]
34279    pub z: f32,
34280    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
34281    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
34282    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
34283    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
34284    pub covariance: [f32; 9],
34285    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
34286    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
34287    pub reset_counter: u8,
34288}
34289impl VISION_SPEED_ESTIMATE_DATA {
34290    pub const ENCODED_LEN: usize = 57usize;
34291    pub const DEFAULT: Self = Self {
34292        usec: 0_u64,
34293        x: 0.0_f32,
34294        y: 0.0_f32,
34295        z: 0.0_f32,
34296        covariance: [0.0_f32; 9usize],
34297        reset_counter: 0_u8,
34298    };
34299    #[cfg(feature = "arbitrary")]
34300    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34301        use arbitrary::{Arbitrary, Unstructured};
34302        let mut buf = [0u8; 1024];
34303        rng.fill_bytes(&mut buf);
34304        let mut unstructured = Unstructured::new(&buf);
34305        Self::arbitrary(&mut unstructured).unwrap_or_default()
34306    }
34307}
34308impl Default for VISION_SPEED_ESTIMATE_DATA {
34309    fn default() -> Self {
34310        Self::DEFAULT.clone()
34311    }
34312}
34313impl MessageData for VISION_SPEED_ESTIMATE_DATA {
34314    type Message = MavMessage;
34315    const ID: u32 = 103u32;
34316    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
34317    const EXTRA_CRC: u8 = 208u8;
34318    const ENCODED_LEN: usize = 57usize;
34319    fn deser(
34320        _version: MavlinkVersion,
34321        __input: &[u8],
34322    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34323        let avail_len = __input.len();
34324        let mut payload_buf = [0; Self::ENCODED_LEN];
34325        let mut buf = if avail_len < Self::ENCODED_LEN {
34326            payload_buf[0..avail_len].copy_from_slice(__input);
34327            Bytes::new(&payload_buf)
34328        } else {
34329            Bytes::new(__input)
34330        };
34331        let mut __struct = Self::default();
34332        __struct.usec = buf.get_u64_le()?;
34333        __struct.x = buf.get_f32_le()?;
34334        __struct.y = buf.get_f32_le()?;
34335        __struct.z = buf.get_f32_le()?;
34336        for v in &mut __struct.covariance {
34337            let val = buf.get_f32_le()?;
34338            *v = val;
34339        }
34340        __struct.reset_counter = buf.get_u8()?;
34341        Ok(__struct)
34342    }
34343    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34344        let mut __tmp = BytesMut::new(bytes);
34345        #[allow(clippy::absurd_extreme_comparisons)]
34346        #[allow(unused_comparisons)]
34347        if __tmp.remaining() < Self::ENCODED_LEN {
34348            panic!(
34349                "buffer is too small (need {} bytes, but got {})",
34350                Self::ENCODED_LEN,
34351                __tmp.remaining(),
34352            )
34353        }
34354        __tmp.put_u64_le(self.usec);
34355        __tmp.put_f32_le(self.x);
34356        __tmp.put_f32_le(self.y);
34357        __tmp.put_f32_le(self.z);
34358        if matches!(version, MavlinkVersion::V2) {
34359            for val in &self.covariance {
34360                __tmp.put_f32_le(*val);
34361            }
34362            __tmp.put_u8(self.reset_counter);
34363            let len = __tmp.len();
34364            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34365        } else {
34366            __tmp.len()
34367        }
34368    }
34369}
34370#[doc = "Cumulative distance traveled for each reported wheel."]
34371#[doc = ""]
34372#[doc = "ID: 9000"]
34373#[derive(Debug, Clone, PartialEq)]
34374#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34375#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34376#[cfg_attr(feature = "ts", derive(TS))]
34377#[cfg_attr(feature = "ts", ts(export))]
34378pub struct WHEEL_DISTANCE_DATA {
34379    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
34380    pub time_usec: u64,
34381    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
34382    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
34383    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
34384    pub distance: [f64; 16],
34385    #[doc = "Number of wheels reported."]
34386    pub count: u8,
34387}
34388impl WHEEL_DISTANCE_DATA {
34389    pub const ENCODED_LEN: usize = 137usize;
34390    pub const DEFAULT: Self = Self {
34391        time_usec: 0_u64,
34392        distance: [0.0_f64; 16usize],
34393        count: 0_u8,
34394    };
34395    #[cfg(feature = "arbitrary")]
34396    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34397        use arbitrary::{Arbitrary, Unstructured};
34398        let mut buf = [0u8; 1024];
34399        rng.fill_bytes(&mut buf);
34400        let mut unstructured = Unstructured::new(&buf);
34401        Self::arbitrary(&mut unstructured).unwrap_or_default()
34402    }
34403}
34404impl Default for WHEEL_DISTANCE_DATA {
34405    fn default() -> Self {
34406        Self::DEFAULT.clone()
34407    }
34408}
34409impl MessageData for WHEEL_DISTANCE_DATA {
34410    type Message = MavMessage;
34411    const ID: u32 = 9000u32;
34412    const NAME: &'static str = "WHEEL_DISTANCE";
34413    const EXTRA_CRC: u8 = 113u8;
34414    const ENCODED_LEN: usize = 137usize;
34415    fn deser(
34416        _version: MavlinkVersion,
34417        __input: &[u8],
34418    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34419        let avail_len = __input.len();
34420        let mut payload_buf = [0; Self::ENCODED_LEN];
34421        let mut buf = if avail_len < Self::ENCODED_LEN {
34422            payload_buf[0..avail_len].copy_from_slice(__input);
34423            Bytes::new(&payload_buf)
34424        } else {
34425            Bytes::new(__input)
34426        };
34427        let mut __struct = Self::default();
34428        __struct.time_usec = buf.get_u64_le()?;
34429        for v in &mut __struct.distance {
34430            let val = buf.get_f64_le()?;
34431            *v = val;
34432        }
34433        __struct.count = buf.get_u8()?;
34434        Ok(__struct)
34435    }
34436    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34437        let mut __tmp = BytesMut::new(bytes);
34438        #[allow(clippy::absurd_extreme_comparisons)]
34439        #[allow(unused_comparisons)]
34440        if __tmp.remaining() < Self::ENCODED_LEN {
34441            panic!(
34442                "buffer is too small (need {} bytes, but got {})",
34443                Self::ENCODED_LEN,
34444                __tmp.remaining(),
34445            )
34446        }
34447        __tmp.put_u64_le(self.time_usec);
34448        for val in &self.distance {
34449            __tmp.put_f64_le(*val);
34450        }
34451        __tmp.put_u8(self.count);
34452        if matches!(version, MavlinkVersion::V2) {
34453            let len = __tmp.len();
34454            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34455        } else {
34456            __tmp.len()
34457        }
34458    }
34459}
34460#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
34461#[doc = ""]
34462#[doc = "ID: 299"]
34463#[derive(Debug, Clone, PartialEq)]
34464#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34465#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34466#[cfg_attr(feature = "ts", derive(TS))]
34467#[cfg_attr(feature = "ts", ts(export))]
34468pub struct WIFI_CONFIG_AP_DATA {
34469    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
34470    #[cfg_attr(feature = "ts", ts(type = "string"))]
34471    pub ssid: CharArray<32>,
34472    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
34473    #[cfg_attr(feature = "ts", ts(type = "string"))]
34474    pub password: CharArray<64>,
34475    #[doc = "WiFi Mode."]
34476    #[cfg_attr(feature = "serde", serde(default))]
34477    pub mode: WifiConfigApMode,
34478    #[doc = "Message acceptance response (sent back to GS)."]
34479    #[cfg_attr(feature = "serde", serde(default))]
34480    pub response: WifiConfigApResponse,
34481}
34482impl WIFI_CONFIG_AP_DATA {
34483    pub const ENCODED_LEN: usize = 98usize;
34484    pub const DEFAULT: Self = Self {
34485        ssid: CharArray::new([0_u8; 32usize]),
34486        password: CharArray::new([0_u8; 64usize]),
34487        mode: WifiConfigApMode::DEFAULT,
34488        response: WifiConfigApResponse::DEFAULT,
34489    };
34490    #[cfg(feature = "arbitrary")]
34491    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34492        use arbitrary::{Arbitrary, Unstructured};
34493        let mut buf = [0u8; 1024];
34494        rng.fill_bytes(&mut buf);
34495        let mut unstructured = Unstructured::new(&buf);
34496        Self::arbitrary(&mut unstructured).unwrap_or_default()
34497    }
34498}
34499impl Default for WIFI_CONFIG_AP_DATA {
34500    fn default() -> Self {
34501        Self::DEFAULT.clone()
34502    }
34503}
34504impl MessageData for WIFI_CONFIG_AP_DATA {
34505    type Message = MavMessage;
34506    const ID: u32 = 299u32;
34507    const NAME: &'static str = "WIFI_CONFIG_AP";
34508    const EXTRA_CRC: u8 = 19u8;
34509    const ENCODED_LEN: usize = 98usize;
34510    fn deser(
34511        _version: MavlinkVersion,
34512        __input: &[u8],
34513    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34514        let avail_len = __input.len();
34515        let mut payload_buf = [0; Self::ENCODED_LEN];
34516        let mut buf = if avail_len < Self::ENCODED_LEN {
34517            payload_buf[0..avail_len].copy_from_slice(__input);
34518            Bytes::new(&payload_buf)
34519        } else {
34520            Bytes::new(__input)
34521        };
34522        let mut __struct = Self::default();
34523        let mut tmp = [0_u8; 32usize];
34524        for v in &mut tmp {
34525            *v = buf.get_u8()?;
34526        }
34527        __struct.ssid = CharArray::new(tmp);
34528        let mut tmp = [0_u8; 64usize];
34529        for v in &mut tmp {
34530            *v = buf.get_u8()?;
34531        }
34532        __struct.password = CharArray::new(tmp);
34533        let tmp = buf.get_i8()?;
34534        __struct.mode =
34535            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
34536                enum_type: "WifiConfigApMode",
34537                value: tmp as u64,
34538            })?;
34539        let tmp = buf.get_i8()?;
34540        __struct.response =
34541            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
34542                enum_type: "WifiConfigApResponse",
34543                value: tmp as u64,
34544            })?;
34545        Ok(__struct)
34546    }
34547    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34548        let mut __tmp = BytesMut::new(bytes);
34549        #[allow(clippy::absurd_extreme_comparisons)]
34550        #[allow(unused_comparisons)]
34551        if __tmp.remaining() < Self::ENCODED_LEN {
34552            panic!(
34553                "buffer is too small (need {} bytes, but got {})",
34554                Self::ENCODED_LEN,
34555                __tmp.remaining(),
34556            )
34557        }
34558        for val in &self.ssid {
34559            __tmp.put_u8(*val);
34560        }
34561        for val in &self.password {
34562            __tmp.put_u8(*val);
34563        }
34564        if matches!(version, MavlinkVersion::V2) {
34565            __tmp.put_i8(self.mode as i8);
34566            __tmp.put_i8(self.response as i8);
34567            let len = __tmp.len();
34568            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34569        } else {
34570            __tmp.len()
34571        }
34572    }
34573}
34574#[doc = "Winch status."]
34575#[doc = ""]
34576#[doc = "ID: 9005"]
34577#[derive(Debug, Clone, PartialEq)]
34578#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34579#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34580#[cfg_attr(feature = "ts", derive(TS))]
34581#[cfg_attr(feature = "ts", ts(export))]
34582pub struct WINCH_STATUS_DATA {
34583    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
34584    pub time_usec: u64,
34585    #[doc = "Length of line released. NaN if unknown"]
34586    pub line_length: f32,
34587    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
34588    pub speed: f32,
34589    #[doc = "Tension on the line. NaN if unknown"]
34590    pub tension: f32,
34591    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
34592    pub voltage: f32,
34593    #[doc = "Current draw from the winch. NaN if unknown"]
34594    pub current: f32,
34595    #[doc = "Status flags"]
34596    pub status: MavWinchStatusFlag,
34597    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
34598    pub temperature: i16,
34599}
34600impl WINCH_STATUS_DATA {
34601    pub const ENCODED_LEN: usize = 34usize;
34602    pub const DEFAULT: Self = Self {
34603        time_usec: 0_u64,
34604        line_length: 0.0_f32,
34605        speed: 0.0_f32,
34606        tension: 0.0_f32,
34607        voltage: 0.0_f32,
34608        current: 0.0_f32,
34609        status: MavWinchStatusFlag::DEFAULT,
34610        temperature: 0_i16,
34611    };
34612    #[cfg(feature = "arbitrary")]
34613    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34614        use arbitrary::{Arbitrary, Unstructured};
34615        let mut buf = [0u8; 1024];
34616        rng.fill_bytes(&mut buf);
34617        let mut unstructured = Unstructured::new(&buf);
34618        Self::arbitrary(&mut unstructured).unwrap_or_default()
34619    }
34620}
34621impl Default for WINCH_STATUS_DATA {
34622    fn default() -> Self {
34623        Self::DEFAULT.clone()
34624    }
34625}
34626impl MessageData for WINCH_STATUS_DATA {
34627    type Message = MavMessage;
34628    const ID: u32 = 9005u32;
34629    const NAME: &'static str = "WINCH_STATUS";
34630    const EXTRA_CRC: u8 = 117u8;
34631    const ENCODED_LEN: usize = 34usize;
34632    fn deser(
34633        _version: MavlinkVersion,
34634        __input: &[u8],
34635    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34636        let avail_len = __input.len();
34637        let mut payload_buf = [0; Self::ENCODED_LEN];
34638        let mut buf = if avail_len < Self::ENCODED_LEN {
34639            payload_buf[0..avail_len].copy_from_slice(__input);
34640            Bytes::new(&payload_buf)
34641        } else {
34642            Bytes::new(__input)
34643        };
34644        let mut __struct = Self::default();
34645        __struct.time_usec = buf.get_u64_le()?;
34646        __struct.line_length = buf.get_f32_le()?;
34647        __struct.speed = buf.get_f32_le()?;
34648        __struct.tension = buf.get_f32_le()?;
34649        __struct.voltage = buf.get_f32_le()?;
34650        __struct.current = buf.get_f32_le()?;
34651        let tmp = buf.get_u32_le()?;
34652        __struct.status = MavWinchStatusFlag::from_bits(tmp as <MavWinchStatusFlag as Flags>::Bits)
34653            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
34654                flag_type: "MavWinchStatusFlag",
34655                value: tmp as u64,
34656            })?;
34657        __struct.temperature = buf.get_i16_le()?;
34658        Ok(__struct)
34659    }
34660    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34661        let mut __tmp = BytesMut::new(bytes);
34662        #[allow(clippy::absurd_extreme_comparisons)]
34663        #[allow(unused_comparisons)]
34664        if __tmp.remaining() < Self::ENCODED_LEN {
34665            panic!(
34666                "buffer is too small (need {} bytes, but got {})",
34667                Self::ENCODED_LEN,
34668                __tmp.remaining(),
34669            )
34670        }
34671        __tmp.put_u64_le(self.time_usec);
34672        __tmp.put_f32_le(self.line_length);
34673        __tmp.put_f32_le(self.speed);
34674        __tmp.put_f32_le(self.tension);
34675        __tmp.put_f32_le(self.voltage);
34676        __tmp.put_f32_le(self.current);
34677        __tmp.put_u32_le(self.status.bits() as u32);
34678        __tmp.put_i16_le(self.temperature);
34679        if matches!(version, MavlinkVersion::V2) {
34680            let len = __tmp.len();
34681            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34682        } else {
34683            __tmp.len()
34684        }
34685    }
34686}
34687#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
34688#[doc = ""]
34689#[doc = "ID: 231"]
34690#[derive(Debug, Clone, PartialEq)]
34691#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34692#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34693#[cfg_attr(feature = "ts", derive(TS))]
34694#[cfg_attr(feature = "ts", ts(export))]
34695pub struct WIND_COV_DATA {
34696    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
34697    pub time_usec: u64,
34698    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
34699    pub wind_x: f32,
34700    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
34701    pub wind_y: f32,
34702    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
34703    pub wind_z: f32,
34704    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
34705    pub var_horiz: f32,
34706    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
34707    pub var_vert: f32,
34708    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
34709    pub wind_alt: f32,
34710    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
34711    pub horiz_accuracy: f32,
34712    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
34713    pub vert_accuracy: f32,
34714}
34715impl WIND_COV_DATA {
34716    pub const ENCODED_LEN: usize = 40usize;
34717    pub const DEFAULT: Self = Self {
34718        time_usec: 0_u64,
34719        wind_x: 0.0_f32,
34720        wind_y: 0.0_f32,
34721        wind_z: 0.0_f32,
34722        var_horiz: 0.0_f32,
34723        var_vert: 0.0_f32,
34724        wind_alt: 0.0_f32,
34725        horiz_accuracy: 0.0_f32,
34726        vert_accuracy: 0.0_f32,
34727    };
34728    #[cfg(feature = "arbitrary")]
34729    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34730        use arbitrary::{Arbitrary, Unstructured};
34731        let mut buf = [0u8; 1024];
34732        rng.fill_bytes(&mut buf);
34733        let mut unstructured = Unstructured::new(&buf);
34734        Self::arbitrary(&mut unstructured).unwrap_or_default()
34735    }
34736}
34737impl Default for WIND_COV_DATA {
34738    fn default() -> Self {
34739        Self::DEFAULT.clone()
34740    }
34741}
34742impl MessageData for WIND_COV_DATA {
34743    type Message = MavMessage;
34744    const ID: u32 = 231u32;
34745    const NAME: &'static str = "WIND_COV";
34746    const EXTRA_CRC: u8 = 105u8;
34747    const ENCODED_LEN: usize = 40usize;
34748    fn deser(
34749        _version: MavlinkVersion,
34750        __input: &[u8],
34751    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34752        let avail_len = __input.len();
34753        let mut payload_buf = [0; Self::ENCODED_LEN];
34754        let mut buf = if avail_len < Self::ENCODED_LEN {
34755            payload_buf[0..avail_len].copy_from_slice(__input);
34756            Bytes::new(&payload_buf)
34757        } else {
34758            Bytes::new(__input)
34759        };
34760        let mut __struct = Self::default();
34761        __struct.time_usec = buf.get_u64_le()?;
34762        __struct.wind_x = buf.get_f32_le()?;
34763        __struct.wind_y = buf.get_f32_le()?;
34764        __struct.wind_z = buf.get_f32_le()?;
34765        __struct.var_horiz = buf.get_f32_le()?;
34766        __struct.var_vert = buf.get_f32_le()?;
34767        __struct.wind_alt = buf.get_f32_le()?;
34768        __struct.horiz_accuracy = buf.get_f32_le()?;
34769        __struct.vert_accuracy = buf.get_f32_le()?;
34770        Ok(__struct)
34771    }
34772    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34773        let mut __tmp = BytesMut::new(bytes);
34774        #[allow(clippy::absurd_extreme_comparisons)]
34775        #[allow(unused_comparisons)]
34776        if __tmp.remaining() < Self::ENCODED_LEN {
34777            panic!(
34778                "buffer is too small (need {} bytes, but got {})",
34779                Self::ENCODED_LEN,
34780                __tmp.remaining(),
34781            )
34782        }
34783        __tmp.put_u64_le(self.time_usec);
34784        __tmp.put_f32_le(self.wind_x);
34785        __tmp.put_f32_le(self.wind_y);
34786        __tmp.put_f32_le(self.wind_z);
34787        __tmp.put_f32_le(self.var_horiz);
34788        __tmp.put_f32_le(self.var_vert);
34789        __tmp.put_f32_le(self.wind_alt);
34790        __tmp.put_f32_le(self.horiz_accuracy);
34791        __tmp.put_f32_le(self.vert_accuracy);
34792        if matches!(version, MavlinkVersion::V2) {
34793            let len = __tmp.len();
34794            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34795        } else {
34796            __tmp.len()
34797        }
34798    }
34799}
34800#[derive(Clone, PartialEq, Debug)]
34801#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34802#[cfg_attr(feature = "serde", serde(tag = "type"))]
34803#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34804#[cfg_attr(feature = "ts", derive(TS))]
34805#[cfg_attr(feature = "ts", ts(export))]
34806#[repr(u32)]
34807pub enum MavMessage {
34808    #[doc = "Set the vehicle attitude and body angular rates."]
34809    #[doc = ""]
34810    #[doc = "ID: 140"]
34811    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
34812    #[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
34813    #[doc = ""]
34814    #[doc = "ID: 375"]
34815    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
34816    #[doc = "The location and information of an ADSB vehicle."]
34817    #[doc = ""]
34818    #[doc = "ID: 246"]
34819    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
34820    #[doc = "The location and information of an AIS vessel."]
34821    #[doc = ""]
34822    #[doc = "ID: 301"]
34823    AIS_VESSEL(AIS_VESSEL_DATA),
34824    #[doc = "The current system altitude."]
34825    #[doc = ""]
34826    #[doc = "ID: 141"]
34827    ALTITUDE(ALTITUDE_DATA),
34828    #[doc = "Array test #0."]
34829    #[doc = ""]
34830    #[doc = "ID: 17150"]
34831    ARRAY_TEST_0(ARRAY_TEST_0_DATA),
34832    #[doc = "Array test #1."]
34833    #[doc = ""]
34834    #[doc = "ID: 17151"]
34835    ARRAY_TEST_1(ARRAY_TEST_1_DATA),
34836    #[doc = "Array test #3."]
34837    #[doc = ""]
34838    #[doc = "ID: 17153"]
34839    ARRAY_TEST_3(ARRAY_TEST_3_DATA),
34840    #[doc = "Array test #4."]
34841    #[doc = ""]
34842    #[doc = "ID: 17154"]
34843    ARRAY_TEST_4(ARRAY_TEST_4_DATA),
34844    #[doc = "Array test #5."]
34845    #[doc = ""]
34846    #[doc = "ID: 17155"]
34847    ARRAY_TEST_5(ARRAY_TEST_5_DATA),
34848    #[doc = "Array test #6."]
34849    #[doc = ""]
34850    #[doc = "ID: 17156"]
34851    ARRAY_TEST_6(ARRAY_TEST_6_DATA),
34852    #[doc = "Array test #7."]
34853    #[doc = ""]
34854    #[doc = "ID: 17157"]
34855    ARRAY_TEST_7(ARRAY_TEST_7_DATA),
34856    #[doc = "Array test #8."]
34857    #[doc = ""]
34858    #[doc = "ID: 17158"]
34859    ARRAY_TEST_8(ARRAY_TEST_8_DATA),
34860    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
34861    #[doc = ""]
34862    #[doc = "ID: 30"]
34863    ATTITUDE(ATTITUDE_DATA),
34864    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
34865    #[doc = ""]
34866    #[doc = "ID: 31"]
34867    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
34868    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
34869    #[doc = ""]
34870    #[doc = "ID: 61"]
34871    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
34872    #[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
34873    #[doc = ""]
34874    #[doc = "ID: 83"]
34875    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
34876    #[doc = "Motion capture attitude and position."]
34877    #[doc = ""]
34878    #[doc = "ID: 138"]
34879    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
34880    #[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
34881    #[doc = ""]
34882    #[doc = "ID: 7"]
34883    AUTH_KEY(AUTH_KEY_DATA),
34884    #[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
34885    #[doc = ""]
34886    #[doc = "ID: 286"]
34887    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
34888    #[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
34889    #[doc = ""]
34890    #[doc = "ID: 148"]
34891    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
34892    #[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
34893    #[doc = ""]
34894    #[doc = "ID: 435"]
34895    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
34896    #[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
34897    #[doc = ""]
34898    #[doc = "ID: 437"]
34899    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
34900    #[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
34901    #[doc = ""]
34902    #[doc = "ID: 372"]
34903    BATTERY_INFO(BATTERY_INFO_DATA),
34904    #[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
34905    #[doc = ""]
34906    #[doc = "ID: 147"]
34907    BATTERY_STATUS(BATTERY_STATUS_DATA),
34908    #[doc = "Report button state change."]
34909    #[doc = ""]
34910    #[doc = "ID: 257"]
34911    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
34912    #[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
34913    #[doc = ""]
34914    #[doc = "ID: 262"]
34915    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
34916    #[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
34917    #[doc = ""]
34918    #[doc = "ID: 271"]
34919    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
34920    #[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
34921    #[doc = ""]
34922    #[doc = "ID: 263"]
34923    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
34924    #[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
34925    #[doc = ""]
34926    #[doc = "ID: 259"]
34927    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
34928    #[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
34929    #[doc = ""]
34930    #[doc = "ID: 260"]
34931    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
34932    #[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
34933    #[doc = ""]
34934    #[doc = "ID: 277"]
34935    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
34936    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
34937    #[doc = ""]
34938    #[doc = "ID: 276"]
34939    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
34940    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
34941    #[doc = ""]
34942    #[doc = "ID: 275"]
34943    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
34944    #[doc = "Camera-IMU triggering and synchronisation message."]
34945    #[doc = ""]
34946    #[doc = "ID: 112"]
34947    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
34948    #[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
34949    #[doc = ""]
34950    #[doc = "ID: 387"]
34951    CANFD_FRAME(CANFD_FRAME_DATA),
34952    #[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
34953    #[doc = ""]
34954    #[doc = "ID: 388"]
34955    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
34956    #[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
34957    #[doc = ""]
34958    #[doc = "ID: 386"]
34959    CAN_FRAME(CAN_FRAME_DATA),
34960    #[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
34961    #[doc = ""]
34962    #[doc = "ID: 336"]
34963    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
34964    #[doc = "Report current used cellular network status."]
34965    #[doc = ""]
34966    #[doc = "ID: 334"]
34967    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
34968    #[doc = "Request to control this MAV."]
34969    #[doc = ""]
34970    #[doc = "ID: 5"]
34971    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
34972    #[doc = "Accept / deny control of this MAV."]
34973    #[doc = ""]
34974    #[doc = "ID: 6"]
34975    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
34976    #[doc = "Information about a potential collision."]
34977    #[doc = ""]
34978    #[doc = "ID: 247"]
34979    COLLISION(COLLISION_DATA),
34980    #[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
34981    #[doc = ""]
34982    #[doc = "ID: 77"]
34983    COMMAND_ACK(COMMAND_ACK_DATA),
34984    #[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
34985    #[doc = ""]
34986    #[doc = "ID: 80"]
34987    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
34988    #[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
34989    #[doc = ""]
34990    #[doc = "ID: 75"]
34991    COMMAND_INT(COMMAND_INT_DATA),
34992    #[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
34993    #[doc = ""]
34994    #[doc = "ID: 76"]
34995    COMMAND_LONG(COMMAND_LONG_DATA),
34996    #[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
34997    #[doc = ""]
34998    #[doc = "ID: 395"]
34999    #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
35000    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
35001    #[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
35002    #[doc = ""]
35003    #[doc = "ID: 396"]
35004    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
35005    #[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
35006    #[doc = ""]
35007    #[doc = "ID: 397"]
35008    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
35009    #[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
35010    #[doc = ""]
35011    #[doc = "ID: 146"]
35012    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
35013    #[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
35014    #[doc = ""]
35015    #[doc = "ID: 411"]
35016    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
35017    #[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
35018    #[doc = ""]
35019    #[doc = "ID: 436"]
35020    CURRENT_MODE(CURRENT_MODE_DATA),
35021    #[doc = "Data stream status information."]
35022    #[doc = ""]
35023    #[doc = "ID: 67"]
35024    #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
35025    DATA_STREAM(DATA_STREAM_DATA),
35026    #[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
35027    #[doc = ""]
35028    #[doc = "ID: 130"]
35029    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
35030    #[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
35031    #[doc = ""]
35032    #[doc = "ID: 254"]
35033    DEBUG(DEBUG_DATA),
35034    #[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
35035    #[doc = ""]
35036    #[doc = "ID: 350"]
35037    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
35038    #[doc = "To debug something using a named 3D vector."]
35039    #[doc = ""]
35040    #[doc = "ID: 250"]
35041    DEBUG_VECT(DEBUG_VECT_DATA),
35042    #[doc = "Distance sensor information for an onboard rangefinder."]
35043    #[doc = ""]
35044    #[doc = "ID: 132"]
35045    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
35046    #[doc = "EFI status output."]
35047    #[doc = ""]
35048    #[doc = "ID: 225"]
35049    EFI_STATUS(EFI_STATUS_DATA),
35050    #[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
35051    #[doc = ""]
35052    #[doc = "ID: 131"]
35053    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
35054    #[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
35055    #[doc = ""]
35056    #[doc = "ID: 290"]
35057    ESC_INFO(ESC_INFO_DATA),
35058    #[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
35059    #[doc = ""]
35060    #[doc = "ID: 291"]
35061    ESC_STATUS(ESC_STATUS_DATA),
35062    #[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
35063    #[doc = ""]
35064    #[doc = "ID: 230"]
35065    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
35066    #[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
35067    #[doc = ""]
35068    #[doc = "ID: 410"]
35069    EVENT(EVENT_DATA),
35070    #[doc = "Provides state for additional features."]
35071    #[doc = ""]
35072    #[doc = "ID: 245"]
35073    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
35074    #[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
35075    #[doc = ""]
35076    #[doc = "ID: 162"]
35077    FENCE_STATUS(FENCE_STATUS_DATA),
35078    #[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
35079    #[doc = ""]
35080    #[doc = "ID: 110"]
35081    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
35082    #[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
35083    #[doc = ""]
35084    #[doc = "ID: 264"]
35085    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
35086    #[doc = "Current motion information from a designated system."]
35087    #[doc = ""]
35088    #[doc = "ID: 144"]
35089    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
35090    #[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
35091    #[doc = ""]
35092    #[doc = "ID: 371"]
35093    FUEL_STATUS(FUEL_STATUS_DATA),
35094    #[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
35095    #[doc = ""]
35096    #[doc = "ID: 373"]
35097    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
35098    #[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
35099    #[doc = ""]
35100    #[doc = "ID: 285"]
35101    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
35102    #[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
35103    #[doc = ""]
35104    #[doc = "ID: 283"]
35105    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
35106    #[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
35107    #[doc = ""]
35108    #[doc = "ID: 284"]
35109    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
35110    #[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
35111    #[doc = ""]
35112    #[doc = "ID: 280"]
35113    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
35114    #[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
35115    #[doc = ""]
35116    #[doc = "ID: 282"]
35117    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
35118    #[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
35119    #[doc = ""]
35120    #[doc = "ID: 288"]
35121    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
35122    #[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
35123    #[doc = ""]
35124    #[doc = "ID: 287"]
35125    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
35126    #[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
35127    #[doc = ""]
35128    #[doc = "ID: 281"]
35129    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
35130    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
35131    #[doc = ""]
35132    #[doc = "ID: 33"]
35133    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
35134    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
35135    #[doc = ""]
35136    #[doc = "ID: 63"]
35137    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
35138    #[doc = "Global position/attitude estimate from a vision source."]
35139    #[doc = ""]
35140    #[doc = "ID: 101"]
35141    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
35142    #[doc = "Second GPS data."]
35143    #[doc = ""]
35144    #[doc = "ID: 124"]
35145    GPS2_RAW(GPS2_RAW_DATA),
35146    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
35147    #[doc = ""]
35148    #[doc = "ID: 128"]
35149    GPS2_RTK(GPS2_RTK_DATA),
35150    #[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
35151    #[doc = ""]
35152    #[doc = "ID: 49"]
35153    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
35154    #[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
35155    #[doc = ""]
35156    #[doc = "ID: 123"]
35157    #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
35158    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
35159    #[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
35160    #[doc = ""]
35161    #[doc = "ID: 232"]
35162    GPS_INPUT(GPS_INPUT_DATA),
35163    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
35164    #[doc = ""]
35165    #[doc = "ID: 24"]
35166    GPS_RAW_INT(GPS_RAW_INT_DATA),
35167    #[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
35168    #[doc = ""]
35169    #[doc = "ID: 233"]
35170    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
35171    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
35172    #[doc = ""]
35173    #[doc = "ID: 127"]
35174    GPS_RTK(GPS_RTK_DATA),
35175    #[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
35176    #[doc = ""]
35177    #[doc = "ID: 25"]
35178    GPS_STATUS(GPS_STATUS_DATA),
35179    #[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
35180    #[doc = ""]
35181    #[doc = "ID: 0"]
35182    HEARTBEAT(HEARTBEAT_DATA),
35183    #[doc = "The IMU readings in SI units in NED body frame."]
35184    #[doc = ""]
35185    #[doc = "ID: 105"]
35186    HIGHRES_IMU(HIGHRES_IMU_DATA),
35187    #[doc = "Message appropriate for high latency connections like Iridium."]
35188    #[doc = ""]
35189    #[doc = "ID: 234"]
35190    #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
35191    HIGH_LATENCY(HIGH_LATENCY_DATA),
35192    #[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
35193    #[doc = ""]
35194    #[doc = "ID: 235"]
35195    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
35196    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
35197    #[doc = ""]
35198    #[doc = "ID: 93"]
35199    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
35200    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
35201    #[doc = ""]
35202    #[doc = "ID: 91"]
35203    HIL_CONTROLS(HIL_CONTROLS_DATA),
35204    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
35205    #[doc = ""]
35206    #[doc = "ID: 113"]
35207    HIL_GPS(HIL_GPS_DATA),
35208    #[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
35209    #[doc = ""]
35210    #[doc = "ID: 114"]
35211    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
35212    #[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
35213    #[doc = ""]
35214    #[doc = "ID: 92"]
35215    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
35216    #[doc = "The IMU readings in SI units in NED body frame."]
35217    #[doc = ""]
35218    #[doc = "ID: 107"]
35219    HIL_SENSOR(HIL_SENSOR_DATA),
35220    #[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
35221    #[doc = ""]
35222    #[doc = "ID: 90"]
35223    #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
35224    HIL_STATE(HIL_STATE_DATA),
35225    #[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
35226    #[doc = ""]
35227    #[doc = "ID: 115"]
35228    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
35229    #[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
35230    #[doc = ""]
35231    #[doc = "ID: 242"]
35232    HOME_POSITION(HOME_POSITION_DATA),
35233    #[doc = "Temperature and humidity from hygrometer."]
35234    #[doc = ""]
35235    #[doc = "ID: 12920"]
35236    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
35237    #[doc = "Illuminator status."]
35238    #[doc = ""]
35239    #[doc = "ID: 440"]
35240    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
35241    #[doc = "Status of the Iridium SBD link."]
35242    #[doc = ""]
35243    #[doc = "ID: 335"]
35244    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
35245    #[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
35246    #[doc = ""]
35247    #[doc = "ID: 149"]
35248    LANDING_TARGET(LANDING_TARGET_DATA),
35249    #[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
35250    #[doc = ""]
35251    #[doc = "ID: 8"]
35252    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
35253    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
35254    #[doc = ""]
35255    #[doc = "ID: 32"]
35256    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
35257    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
35258    #[doc = ""]
35259    #[doc = "ID: 64"]
35260    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
35261    #[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
35262    #[doc = ""]
35263    #[doc = "ID: 89"]
35264    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
35265    #[doc = "An ack for a LOGGING_DATA_ACKED message."]
35266    #[doc = ""]
35267    #[doc = "ID: 268"]
35268    LOGGING_ACK(LOGGING_ACK_DATA),
35269    #[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
35270    #[doc = ""]
35271    #[doc = "ID: 266"]
35272    LOGGING_DATA(LOGGING_DATA_DATA),
35273    #[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
35274    #[doc = ""]
35275    #[doc = "ID: 267"]
35276    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
35277    #[doc = "Reply to LOG_REQUEST_DATA."]
35278    #[doc = ""]
35279    #[doc = "ID: 120"]
35280    LOG_DATA(LOG_DATA_DATA),
35281    #[doc = "Reply to LOG_REQUEST_LIST."]
35282    #[doc = ""]
35283    #[doc = "ID: 118"]
35284    LOG_ENTRY(LOG_ENTRY_DATA),
35285    #[doc = "Erase all logs."]
35286    #[doc = ""]
35287    #[doc = "ID: 121"]
35288    LOG_ERASE(LOG_ERASE_DATA),
35289    #[doc = "Request a chunk of a log."]
35290    #[doc = ""]
35291    #[doc = "ID: 119"]
35292    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
35293    #[doc = "Stop log transfer and resume normal logging."]
35294    #[doc = ""]
35295    #[doc = "ID: 122"]
35296    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
35297    #[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
35298    #[doc = ""]
35299    #[doc = "ID: 117"]
35300    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
35301    #[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
35302    #[doc = ""]
35303    #[doc = "ID: 192"]
35304    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
35305    #[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
35306    #[doc = ""]
35307    #[doc = "ID: 69"]
35308    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
35309    #[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
35310    #[doc = ""]
35311    #[doc = "ID: 81"]
35312    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
35313    #[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
35314    #[doc = ""]
35315    #[doc = "ID: 249"]
35316    MEMORY_VECT(MEMORY_VECT_DATA),
35317    #[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
35318    #[doc = ""]
35319    #[doc = "ID: 244"]
35320    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
35321    #[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
35322    #[doc = ""]
35323    #[doc = "ID: 47"]
35324    MISSION_ACK(MISSION_ACK_DATA),
35325    #[doc = "Delete all mission items at once."]
35326    #[doc = ""]
35327    #[doc = "ID: 45"]
35328    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
35329    #[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
35330    #[doc = ""]
35331    #[doc = "ID: 44"]
35332    MISSION_COUNT(MISSION_COUNT_DATA),
35333    #[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
35334    #[doc = ""]
35335    #[doc = "ID: 42"]
35336    MISSION_CURRENT(MISSION_CURRENT_DATA),
35337    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
35338    #[doc = ""]
35339    #[doc = "ID: 39"]
35340    #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
35341    MISSION_ITEM(MISSION_ITEM_DATA),
35342    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
35343    #[doc = ""]
35344    #[doc = "ID: 73"]
35345    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
35346    #[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
35347    #[doc = ""]
35348    #[doc = "ID: 46"]
35349    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
35350    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
35351    #[doc = ""]
35352    #[doc = "ID: 40"]
35353    #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
35354    MISSION_REQUEST(MISSION_REQUEST_DATA),
35355    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
35356    #[doc = ""]
35357    #[doc = "ID: 51"]
35358    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
35359    #[doc = "Request the overall list of mission items from the system/component."]
35360    #[doc = ""]
35361    #[doc = "ID: 43"]
35362    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
35363    #[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
35364    #[doc = ""]
35365    #[doc = "ID: 37"]
35366    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
35367    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
35368    #[doc = ""]
35369    #[doc = "ID: 41"]
35370    #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
35371    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
35372    #[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
35373    #[doc = ""]
35374    #[doc = "ID: 38"]
35375    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
35376    #[doc = "Orientation of a mount."]
35377    #[doc = ""]
35378    #[doc = "ID: 265"]
35379    #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
35380    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
35381    #[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
35382    #[doc = ""]
35383    #[doc = "ID: 251"]
35384    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
35385    #[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
35386    #[doc = ""]
35387    #[doc = "ID: 252"]
35388    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
35389    #[doc = "The state of the navigation and position controller."]
35390    #[doc = ""]
35391    #[doc = "ID: 62"]
35392    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
35393    #[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
35394    #[doc = ""]
35395    #[doc = "ID: 330"]
35396    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
35397    #[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
35398    #[doc = ""]
35399    #[doc = "ID: 331"]
35400    ODOMETRY(ODOMETRY_DATA),
35401    #[doc = "Hardware status sent by an onboard computer."]
35402    #[doc = ""]
35403    #[doc = "ID: 390"]
35404    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
35405    #[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
35406    #[doc = ""]
35407    #[doc = "ID: 12918"]
35408    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
35409    #[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
35410    #[doc = ""]
35411    #[doc = "ID: 12902"]
35412    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
35413    #[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
35414    #[doc = ""]
35415    #[doc = "ID: 12900"]
35416    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
35417    #[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
35418    #[doc = ""]
35419    #[doc = "ID: 12901"]
35420    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
35421    #[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
35422    #[doc = ""]
35423    #[doc = "ID: 12915"]
35424    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
35425    #[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
35426    #[doc = ""]
35427    #[doc = "ID: 12905"]
35428    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
35429    #[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
35430    #[doc = ""]
35431    #[doc = "ID: 12903"]
35432    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
35433    #[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
35434    #[doc = ""]
35435    #[doc = "ID: 12904"]
35436    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
35437    #[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
35438    #[doc = ""]
35439    #[doc = "ID: 12919"]
35440    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
35441    #[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
35442    #[doc = ""]
35443    #[doc = "ID: 100"]
35444    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
35445    #[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
35446    #[doc = ""]
35447    #[doc = "ID: 106"]
35448    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
35449    #[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
35450    #[doc = ""]
35451    #[doc = "ID: 360"]
35452    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
35453    #[doc = "Response from a PARAM_EXT_SET message."]
35454    #[doc = ""]
35455    #[doc = "ID: 324"]
35456    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
35457    #[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
35458    #[doc = ""]
35459    #[doc = "ID: 321"]
35460    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
35461    #[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
35462    #[doc = ""]
35463    #[doc = "ID: 320"]
35464    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
35465    #[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
35466    #[doc = ""]
35467    #[doc = "ID: 323"]
35468    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
35469    #[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
35470    #[doc = ""]
35471    #[doc = "ID: 322"]
35472    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
35473    #[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
35474    #[doc = ""]
35475    #[doc = "ID: 50"]
35476    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
35477    #[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
35478    #[doc = ""]
35479    #[doc = "ID: 21"]
35480    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
35481    #[doc = "Request to read the onboard parameter with the param_id string id. Onboard parameters are stored as key[const char*] -&gt;value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
35482    #[doc = ""]
35483    #[doc = "ID: 20"]
35484    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
35485    #[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
35486    #[doc = ""]
35487    #[doc = "ID: 23"]
35488    PARAM_SET(PARAM_SET_DATA),
35489    #[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
35490    #[doc = ""]
35491    #[doc = "ID: 22"]
35492    PARAM_VALUE(PARAM_VALUE_DATA),
35493    #[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
35494    #[doc = ""]
35495    #[doc = "ID: 4"]
35496    #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
35497    PING(PING_DATA),
35498    #[doc = "Control vehicle tone generation (buzzer)."]
35499    #[doc = ""]
35500    #[doc = "ID: 258"]
35501    #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
35502    PLAY_TUNE(PLAY_TUNE_DATA),
35503    #[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
35504    #[doc = ""]
35505    #[doc = "ID: 400"]
35506    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
35507    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
35508    #[doc = ""]
35509    #[doc = "ID: 87"]
35510    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
35511    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
35512    #[doc = ""]
35513    #[doc = "ID: 85"]
35514    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
35515    #[doc = "Power supply status."]
35516    #[doc = ""]
35517    #[doc = "ID: 125"]
35518    POWER_STATUS(POWER_STATUS_DATA),
35519    #[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
35520    #[doc = ""]
35521    #[doc = "ID: 300"]
35522    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
35523    #[doc = "Status generated by radio and injected into MAVLink stream."]
35524    #[doc = ""]
35525    #[doc = "ID: 109"]
35526    RADIO_STATUS(RADIO_STATUS_DATA),
35527    #[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
35528    #[doc = ""]
35529    #[doc = "ID: 27"]
35530    RAW_IMU(RAW_IMU_DATA),
35531    #[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
35532    #[doc = ""]
35533    #[doc = "ID: 28"]
35534    RAW_PRESSURE(RAW_PRESSURE_DATA),
35535    #[doc = "RPM sensor data message."]
35536    #[doc = ""]
35537    #[doc = "ID: 339"]
35538    RAW_RPM(RAW_RPM_DATA),
35539    #[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
35540    #[doc = ""]
35541    #[doc = "ID: 65"]
35542    RC_CHANNELS(RC_CHANNELS_DATA),
35543    #[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
35544    #[doc = ""]
35545    #[doc = "ID: 70"]
35546    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
35547    #[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
35548    #[doc = ""]
35549    #[doc = "ID: 35"]
35550    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
35551    #[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
35552    #[doc = ""]
35553    #[doc = "ID: 34"]
35554    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
35555    #[doc = "Request a data stream."]
35556    #[doc = ""]
35557    #[doc = "ID: 66"]
35558    #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
35559    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
35560    #[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
35561    #[doc = ""]
35562    #[doc = "ID: 412"]
35563    REQUEST_EVENT(REQUEST_EVENT_DATA),
35564    #[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
35565    #[doc = ""]
35566    #[doc = "ID: 142"]
35567    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
35568    #[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
35569    #[doc = ""]
35570    #[doc = "ID: 413"]
35571    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
35572    #[doc = "Read out the safety zone the MAV currently assumes."]
35573    #[doc = ""]
35574    #[doc = "ID: 55"]
35575    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
35576    #[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
35577    #[doc = ""]
35578    #[doc = "ID: 54"]
35579    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
35580    #[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
35581    #[doc = ""]
35582    #[doc = "ID: 26"]
35583    SCALED_IMU(SCALED_IMU_DATA),
35584    #[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
35585    #[doc = ""]
35586    #[doc = "ID: 116"]
35587    SCALED_IMU2(SCALED_IMU2_DATA),
35588    #[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
35589    #[doc = ""]
35590    #[doc = "ID: 129"]
35591    SCALED_IMU3(SCALED_IMU3_DATA),
35592    #[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
35593    #[doc = ""]
35594    #[doc = "ID: 29"]
35595    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
35596    #[doc = "Barometer readings for 2nd barometer."]
35597    #[doc = ""]
35598    #[doc = "ID: 137"]
35599    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
35600    #[doc = "Barometer readings for 3rd barometer."]
35601    #[doc = ""]
35602    #[doc = "ID: 143"]
35603    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
35604    #[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
35605    #[doc = ""]
35606    #[doc = "ID: 126"]
35607    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
35608    #[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
35609    #[doc = ""]
35610    #[doc = "ID: 36"]
35611    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
35612    #[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
35613    #[doc = ""]
35614    #[doc = "ID: 256"]
35615    SETUP_SIGNING(SETUP_SIGNING_DATA),
35616    #[doc = "Set the vehicle attitude and body angular rates."]
35617    #[doc = ""]
35618    #[doc = "ID: 139"]
35619    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
35620    #[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
35621    #[doc = ""]
35622    #[doc = "ID: 82"]
35623    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
35624    #[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
35625    #[doc = ""]
35626    #[doc = "ID: 48"]
35627    #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
35628    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
35629    #[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
35630    #[doc = ""]
35631    #[doc = "ID: 243"]
35632    #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
35633    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
35634    #[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
35635    #[doc = ""]
35636    #[doc = "ID: 11"]
35637    #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
35638    SET_MODE(SET_MODE_DATA),
35639    #[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
35640    #[doc = ""]
35641    #[doc = "ID: 86"]
35642    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
35643    #[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
35644    #[doc = ""]
35645    #[doc = "ID: 84"]
35646    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
35647    #[doc = "Status of simulation environment, if used."]
35648    #[doc = ""]
35649    #[doc = "ID: 108"]
35650    SIM_STATE(SIM_STATE_DATA),
35651    #[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
35652    #[doc = ""]
35653    #[doc = "ID: 370"]
35654    #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
35655    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
35656    #[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
35657    #[doc = ""]
35658    #[doc = "ID: 253"]
35659    STATUSTEXT(STATUSTEXT_DATA),
35660    #[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
35661    #[doc = ""]
35662    #[doc = "ID: 261"]
35663    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
35664    #[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
35665    #[doc = ""]
35666    #[doc = "ID: 401"]
35667    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
35668    #[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
35669    #[doc = ""]
35670    #[doc = "ID: 2"]
35671    SYSTEM_TIME(SYSTEM_TIME_DATA),
35672    #[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
35673    #[doc = ""]
35674    #[doc = "ID: 1"]
35675    SYS_STATUS(SYS_STATUS_DATA),
35676    #[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
35677    #[doc = ""]
35678    #[doc = "ID: 135"]
35679    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
35680    #[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
35681    #[doc = ""]
35682    #[doc = "ID: 134"]
35683    TERRAIN_DATA(TERRAIN_DATA_DATA),
35684    #[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
35685    #[doc = ""]
35686    #[doc = "ID: 136"]
35687    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
35688    #[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
35689    #[doc = ""]
35690    #[doc = "ID: 133"]
35691    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
35692    #[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
35693    #[doc = ""]
35694    #[doc = "ID: 111"]
35695    TIMESYNC(TIMESYNC_DATA),
35696    #[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
35697    #[doc = ""]
35698    #[doc = "ID: 380"]
35699    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
35700    #[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
35701    #[doc = ""]
35702    #[doc = "ID: 333"]
35703    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
35704    #[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
35705    #[doc = ""]
35706    #[doc = "ID: 332"]
35707    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
35708    #[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
35709    #[doc = ""]
35710    #[doc = "ID: 385"]
35711    TUNNEL(TUNNEL_DATA),
35712    #[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
35713    #[doc = ""]
35714    #[doc = "ID: 311"]
35715    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
35716    #[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
35717    #[doc = ""]
35718    #[doc = "ID: 310"]
35719    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
35720    #[doc = "The global position resulting from GPS and sensor fusion."]
35721    #[doc = ""]
35722    #[doc = "ID: 340"]
35723    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
35724    #[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
35725    #[doc = ""]
35726    #[doc = "ID: 248"]
35727    V2_EXTENSION(V2_EXTENSION_DATA),
35728    #[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
35729    #[doc = ""]
35730    #[doc = "ID: 74"]
35731    VFR_HUD(VFR_HUD_DATA),
35732    #[doc = "Vibration levels and accelerometer clipping."]
35733    #[doc = ""]
35734    #[doc = "ID: 241"]
35735    VIBRATION(VIBRATION_DATA),
35736    #[doc = "Global position estimate from a Vicon motion system source."]
35737    #[doc = ""]
35738    #[doc = "ID: 104"]
35739    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
35740    #[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
35741    #[doc = ""]
35742    #[doc = "ID: 269"]
35743    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
35744    #[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
35745    #[doc = ""]
35746    #[doc = "ID: 270"]
35747    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
35748    #[doc = "Local position/attitude estimate from a vision source."]
35749    #[doc = ""]
35750    #[doc = "ID: 102"]
35751    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
35752    #[doc = "Speed estimate from a vision source."]
35753    #[doc = ""]
35754    #[doc = "ID: 103"]
35755    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
35756    #[doc = "Cumulative distance traveled for each reported wheel."]
35757    #[doc = ""]
35758    #[doc = "ID: 9000"]
35759    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
35760    #[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
35761    #[doc = ""]
35762    #[doc = "ID: 299"]
35763    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
35764    #[doc = "Winch status."]
35765    #[doc = ""]
35766    #[doc = "ID: 9005"]
35767    WINCH_STATUS(WINCH_STATUS_DATA),
35768    #[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
35769    #[doc = ""]
35770    #[doc = "ID: 231"]
35771    WIND_COV(WIND_COV_DATA),
35772}
35773impl MavMessage {
35774    pub const fn all_ids() -> &'static [u32] {
35775        &[
35776            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
35777            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
35778            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
35779            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
35780            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
35781            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
35782            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
35783            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
35784            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
35785            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
35786            148u32, 149u32, 162u32, 192u32, 225u32, 230u32, 231u32, 232u32, 233u32, 234u32, 235u32,
35787            241u32, 242u32, 243u32, 244u32, 245u32, 246u32, 247u32, 248u32, 249u32, 250u32, 251u32,
35788            252u32, 253u32, 254u32, 256u32, 257u32, 258u32, 259u32, 260u32, 261u32, 262u32, 263u32,
35789            264u32, 265u32, 266u32, 267u32, 268u32, 269u32, 270u32, 271u32, 275u32, 276u32, 277u32,
35790            280u32, 281u32, 282u32, 283u32, 284u32, 285u32, 286u32, 287u32, 288u32, 290u32, 291u32,
35791            299u32, 300u32, 301u32, 310u32, 311u32, 320u32, 321u32, 322u32, 323u32, 324u32, 330u32,
35792            331u32, 332u32, 333u32, 334u32, 335u32, 336u32, 339u32, 340u32, 350u32, 360u32, 370u32,
35793            371u32, 372u32, 373u32, 375u32, 380u32, 385u32, 386u32, 387u32, 388u32, 390u32, 395u32,
35794            396u32, 397u32, 400u32, 401u32, 410u32, 411u32, 412u32, 413u32, 435u32, 436u32, 437u32,
35795            440u32, 9000u32, 9005u32, 12900u32, 12901u32, 12902u32, 12903u32, 12904u32, 12905u32,
35796            12915u32, 12918u32, 12919u32, 12920u32, 17150u32, 17151u32, 17153u32, 17154u32,
35797            17155u32, 17156u32, 17157u32, 17158u32,
35798        ]
35799    }
35800    pub const fn all_messages() -> &'static [(&'static str, u32)] {
35801        &[
35802            (HEARTBEAT_DATA::NAME, HEARTBEAT_DATA::ID),
35803            (SYS_STATUS_DATA::NAME, SYS_STATUS_DATA::ID),
35804            (SYSTEM_TIME_DATA::NAME, SYSTEM_TIME_DATA::ID),
35805            (PING_DATA::NAME, PING_DATA::ID),
35806            (
35807                CHANGE_OPERATOR_CONTROL_DATA::NAME,
35808                CHANGE_OPERATOR_CONTROL_DATA::ID,
35809            ),
35810            (
35811                CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
35812                CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
35813            ),
35814            (AUTH_KEY_DATA::NAME, AUTH_KEY_DATA::ID),
35815            (LINK_NODE_STATUS_DATA::NAME, LINK_NODE_STATUS_DATA::ID),
35816            (SET_MODE_DATA::NAME, SET_MODE_DATA::ID),
35817            (PARAM_REQUEST_READ_DATA::NAME, PARAM_REQUEST_READ_DATA::ID),
35818            (PARAM_REQUEST_LIST_DATA::NAME, PARAM_REQUEST_LIST_DATA::ID),
35819            (PARAM_VALUE_DATA::NAME, PARAM_VALUE_DATA::ID),
35820            (PARAM_SET_DATA::NAME, PARAM_SET_DATA::ID),
35821            (GPS_RAW_INT_DATA::NAME, GPS_RAW_INT_DATA::ID),
35822            (GPS_STATUS_DATA::NAME, GPS_STATUS_DATA::ID),
35823            (SCALED_IMU_DATA::NAME, SCALED_IMU_DATA::ID),
35824            (RAW_IMU_DATA::NAME, RAW_IMU_DATA::ID),
35825            (RAW_PRESSURE_DATA::NAME, RAW_PRESSURE_DATA::ID),
35826            (SCALED_PRESSURE_DATA::NAME, SCALED_PRESSURE_DATA::ID),
35827            (ATTITUDE_DATA::NAME, ATTITUDE_DATA::ID),
35828            (ATTITUDE_QUATERNION_DATA::NAME, ATTITUDE_QUATERNION_DATA::ID),
35829            (LOCAL_POSITION_NED_DATA::NAME, LOCAL_POSITION_NED_DATA::ID),
35830            (GLOBAL_POSITION_INT_DATA::NAME, GLOBAL_POSITION_INT_DATA::ID),
35831            (RC_CHANNELS_SCALED_DATA::NAME, RC_CHANNELS_SCALED_DATA::ID),
35832            (RC_CHANNELS_RAW_DATA::NAME, RC_CHANNELS_RAW_DATA::ID),
35833            (SERVO_OUTPUT_RAW_DATA::NAME, SERVO_OUTPUT_RAW_DATA::ID),
35834            (
35835                MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
35836                MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
35837            ),
35838            (
35839                MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
35840                MISSION_WRITE_PARTIAL_LIST_DATA::ID,
35841            ),
35842            (MISSION_ITEM_DATA::NAME, MISSION_ITEM_DATA::ID),
35843            (MISSION_REQUEST_DATA::NAME, MISSION_REQUEST_DATA::ID),
35844            (MISSION_SET_CURRENT_DATA::NAME, MISSION_SET_CURRENT_DATA::ID),
35845            (MISSION_CURRENT_DATA::NAME, MISSION_CURRENT_DATA::ID),
35846            (
35847                MISSION_REQUEST_LIST_DATA::NAME,
35848                MISSION_REQUEST_LIST_DATA::ID,
35849            ),
35850            (MISSION_COUNT_DATA::NAME, MISSION_COUNT_DATA::ID),
35851            (MISSION_CLEAR_ALL_DATA::NAME, MISSION_CLEAR_ALL_DATA::ID),
35852            (
35853                MISSION_ITEM_REACHED_DATA::NAME,
35854                MISSION_ITEM_REACHED_DATA::ID,
35855            ),
35856            (MISSION_ACK_DATA::NAME, MISSION_ACK_DATA::ID),
35857            (
35858                SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
35859                SET_GPS_GLOBAL_ORIGIN_DATA::ID,
35860            ),
35861            (GPS_GLOBAL_ORIGIN_DATA::NAME, GPS_GLOBAL_ORIGIN_DATA::ID),
35862            (PARAM_MAP_RC_DATA::NAME, PARAM_MAP_RC_DATA::ID),
35863            (MISSION_REQUEST_INT_DATA::NAME, MISSION_REQUEST_INT_DATA::ID),
35864            (
35865                SAFETY_SET_ALLOWED_AREA_DATA::NAME,
35866                SAFETY_SET_ALLOWED_AREA_DATA::ID,
35867            ),
35868            (SAFETY_ALLOWED_AREA_DATA::NAME, SAFETY_ALLOWED_AREA_DATA::ID),
35869            (
35870                ATTITUDE_QUATERNION_COV_DATA::NAME,
35871                ATTITUDE_QUATERNION_COV_DATA::ID,
35872            ),
35873            (
35874                NAV_CONTROLLER_OUTPUT_DATA::NAME,
35875                NAV_CONTROLLER_OUTPUT_DATA::ID,
35876            ),
35877            (
35878                GLOBAL_POSITION_INT_COV_DATA::NAME,
35879                GLOBAL_POSITION_INT_COV_DATA::ID,
35880            ),
35881            (
35882                LOCAL_POSITION_NED_COV_DATA::NAME,
35883                LOCAL_POSITION_NED_COV_DATA::ID,
35884            ),
35885            (RC_CHANNELS_DATA::NAME, RC_CHANNELS_DATA::ID),
35886            (REQUEST_DATA_STREAM_DATA::NAME, REQUEST_DATA_STREAM_DATA::ID),
35887            (DATA_STREAM_DATA::NAME, DATA_STREAM_DATA::ID),
35888            (MANUAL_CONTROL_DATA::NAME, MANUAL_CONTROL_DATA::ID),
35889            (
35890                RC_CHANNELS_OVERRIDE_DATA::NAME,
35891                RC_CHANNELS_OVERRIDE_DATA::ID,
35892            ),
35893            (MISSION_ITEM_INT_DATA::NAME, MISSION_ITEM_INT_DATA::ID),
35894            (VFR_HUD_DATA::NAME, VFR_HUD_DATA::ID),
35895            (COMMAND_INT_DATA::NAME, COMMAND_INT_DATA::ID),
35896            (COMMAND_LONG_DATA::NAME, COMMAND_LONG_DATA::ID),
35897            (COMMAND_ACK_DATA::NAME, COMMAND_ACK_DATA::ID),
35898            (COMMAND_CANCEL_DATA::NAME, COMMAND_CANCEL_DATA::ID),
35899            (MANUAL_SETPOINT_DATA::NAME, MANUAL_SETPOINT_DATA::ID),
35900            (SET_ATTITUDE_TARGET_DATA::NAME, SET_ATTITUDE_TARGET_DATA::ID),
35901            (ATTITUDE_TARGET_DATA::NAME, ATTITUDE_TARGET_DATA::ID),
35902            (
35903                SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
35904                SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
35905            ),
35906            (
35907                POSITION_TARGET_LOCAL_NED_DATA::NAME,
35908                POSITION_TARGET_LOCAL_NED_DATA::ID,
35909            ),
35910            (
35911                SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
35912                SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
35913            ),
35914            (
35915                POSITION_TARGET_GLOBAL_INT_DATA::NAME,
35916                POSITION_TARGET_GLOBAL_INT_DATA::ID,
35917            ),
35918            (
35919                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME,
35920                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID,
35921            ),
35922            (HIL_STATE_DATA::NAME, HIL_STATE_DATA::ID),
35923            (HIL_CONTROLS_DATA::NAME, HIL_CONTROLS_DATA::ID),
35924            (HIL_RC_INPUTS_RAW_DATA::NAME, HIL_RC_INPUTS_RAW_DATA::ID),
35925            (
35926                HIL_ACTUATOR_CONTROLS_DATA::NAME,
35927                HIL_ACTUATOR_CONTROLS_DATA::ID,
35928            ),
35929            (OPTICAL_FLOW_DATA::NAME, OPTICAL_FLOW_DATA::ID),
35930            (
35931                GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
35932                GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
35933            ),
35934            (
35935                VISION_POSITION_ESTIMATE_DATA::NAME,
35936                VISION_POSITION_ESTIMATE_DATA::ID,
35937            ),
35938            (
35939                VISION_SPEED_ESTIMATE_DATA::NAME,
35940                VISION_SPEED_ESTIMATE_DATA::ID,
35941            ),
35942            (
35943                VICON_POSITION_ESTIMATE_DATA::NAME,
35944                VICON_POSITION_ESTIMATE_DATA::ID,
35945            ),
35946            (HIGHRES_IMU_DATA::NAME, HIGHRES_IMU_DATA::ID),
35947            (OPTICAL_FLOW_RAD_DATA::NAME, OPTICAL_FLOW_RAD_DATA::ID),
35948            (HIL_SENSOR_DATA::NAME, HIL_SENSOR_DATA::ID),
35949            (SIM_STATE_DATA::NAME, SIM_STATE_DATA::ID),
35950            (RADIO_STATUS_DATA::NAME, RADIO_STATUS_DATA::ID),
35951            (
35952                FILE_TRANSFER_PROTOCOL_DATA::NAME,
35953                FILE_TRANSFER_PROTOCOL_DATA::ID,
35954            ),
35955            (TIMESYNC_DATA::NAME, TIMESYNC_DATA::ID),
35956            (CAMERA_TRIGGER_DATA::NAME, CAMERA_TRIGGER_DATA::ID),
35957            (HIL_GPS_DATA::NAME, HIL_GPS_DATA::ID),
35958            (HIL_OPTICAL_FLOW_DATA::NAME, HIL_OPTICAL_FLOW_DATA::ID),
35959            (
35960                HIL_STATE_QUATERNION_DATA::NAME,
35961                HIL_STATE_QUATERNION_DATA::ID,
35962            ),
35963            (SCALED_IMU2_DATA::NAME, SCALED_IMU2_DATA::ID),
35964            (LOG_REQUEST_LIST_DATA::NAME, LOG_REQUEST_LIST_DATA::ID),
35965            (LOG_ENTRY_DATA::NAME, LOG_ENTRY_DATA::ID),
35966            (LOG_REQUEST_DATA_DATA::NAME, LOG_REQUEST_DATA_DATA::ID),
35967            (LOG_DATA_DATA::NAME, LOG_DATA_DATA::ID),
35968            (LOG_ERASE_DATA::NAME, LOG_ERASE_DATA::ID),
35969            (LOG_REQUEST_END_DATA::NAME, LOG_REQUEST_END_DATA::ID),
35970            (GPS_INJECT_DATA_DATA::NAME, GPS_INJECT_DATA_DATA::ID),
35971            (GPS2_RAW_DATA::NAME, GPS2_RAW_DATA::ID),
35972            (POWER_STATUS_DATA::NAME, POWER_STATUS_DATA::ID),
35973            (SERIAL_CONTROL_DATA::NAME, SERIAL_CONTROL_DATA::ID),
35974            (GPS_RTK_DATA::NAME, GPS_RTK_DATA::ID),
35975            (GPS2_RTK_DATA::NAME, GPS2_RTK_DATA::ID),
35976            (SCALED_IMU3_DATA::NAME, SCALED_IMU3_DATA::ID),
35977            (
35978                DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
35979                DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
35980            ),
35981            (ENCAPSULATED_DATA_DATA::NAME, ENCAPSULATED_DATA_DATA::ID),
35982            (DISTANCE_SENSOR_DATA::NAME, DISTANCE_SENSOR_DATA::ID),
35983            (TERRAIN_REQUEST_DATA::NAME, TERRAIN_REQUEST_DATA::ID),
35984            (TERRAIN_DATA_DATA::NAME, TERRAIN_DATA_DATA::ID),
35985            (TERRAIN_CHECK_DATA::NAME, TERRAIN_CHECK_DATA::ID),
35986            (TERRAIN_REPORT_DATA::NAME, TERRAIN_REPORT_DATA::ID),
35987            (SCALED_PRESSURE2_DATA::NAME, SCALED_PRESSURE2_DATA::ID),
35988            (ATT_POS_MOCAP_DATA::NAME, ATT_POS_MOCAP_DATA::ID),
35989            (
35990                SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
35991                SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
35992            ),
35993            (
35994                ACTUATOR_CONTROL_TARGET_DATA::NAME,
35995                ACTUATOR_CONTROL_TARGET_DATA::ID,
35996            ),
35997            (ALTITUDE_DATA::NAME, ALTITUDE_DATA::ID),
35998            (RESOURCE_REQUEST_DATA::NAME, RESOURCE_REQUEST_DATA::ID),
35999            (SCALED_PRESSURE3_DATA::NAME, SCALED_PRESSURE3_DATA::ID),
36000            (FOLLOW_TARGET_DATA::NAME, FOLLOW_TARGET_DATA::ID),
36001            (
36002                CONTROL_SYSTEM_STATE_DATA::NAME,
36003                CONTROL_SYSTEM_STATE_DATA::ID,
36004            ),
36005            (BATTERY_STATUS_DATA::NAME, BATTERY_STATUS_DATA::ID),
36006            (AUTOPILOT_VERSION_DATA::NAME, AUTOPILOT_VERSION_DATA::ID),
36007            (LANDING_TARGET_DATA::NAME, LANDING_TARGET_DATA::ID),
36008            (FENCE_STATUS_DATA::NAME, FENCE_STATUS_DATA::ID),
36009            (MAG_CAL_REPORT_DATA::NAME, MAG_CAL_REPORT_DATA::ID),
36010            (EFI_STATUS_DATA::NAME, EFI_STATUS_DATA::ID),
36011            (ESTIMATOR_STATUS_DATA::NAME, ESTIMATOR_STATUS_DATA::ID),
36012            (WIND_COV_DATA::NAME, WIND_COV_DATA::ID),
36013            (GPS_INPUT_DATA::NAME, GPS_INPUT_DATA::ID),
36014            (GPS_RTCM_DATA_DATA::NAME, GPS_RTCM_DATA_DATA::ID),
36015            (HIGH_LATENCY_DATA::NAME, HIGH_LATENCY_DATA::ID),
36016            (HIGH_LATENCY2_DATA::NAME, HIGH_LATENCY2_DATA::ID),
36017            (VIBRATION_DATA::NAME, VIBRATION_DATA::ID),
36018            (HOME_POSITION_DATA::NAME, HOME_POSITION_DATA::ID),
36019            (SET_HOME_POSITION_DATA::NAME, SET_HOME_POSITION_DATA::ID),
36020            (MESSAGE_INTERVAL_DATA::NAME, MESSAGE_INTERVAL_DATA::ID),
36021            (EXTENDED_SYS_STATE_DATA::NAME, EXTENDED_SYS_STATE_DATA::ID),
36022            (ADSB_VEHICLE_DATA::NAME, ADSB_VEHICLE_DATA::ID),
36023            (COLLISION_DATA::NAME, COLLISION_DATA::ID),
36024            (V2_EXTENSION_DATA::NAME, V2_EXTENSION_DATA::ID),
36025            (MEMORY_VECT_DATA::NAME, MEMORY_VECT_DATA::ID),
36026            (DEBUG_VECT_DATA::NAME, DEBUG_VECT_DATA::ID),
36027            (NAMED_VALUE_FLOAT_DATA::NAME, NAMED_VALUE_FLOAT_DATA::ID),
36028            (NAMED_VALUE_INT_DATA::NAME, NAMED_VALUE_INT_DATA::ID),
36029            (STATUSTEXT_DATA::NAME, STATUSTEXT_DATA::ID),
36030            (DEBUG_DATA::NAME, DEBUG_DATA::ID),
36031            (SETUP_SIGNING_DATA::NAME, SETUP_SIGNING_DATA::ID),
36032            (BUTTON_CHANGE_DATA::NAME, BUTTON_CHANGE_DATA::ID),
36033            (PLAY_TUNE_DATA::NAME, PLAY_TUNE_DATA::ID),
36034            (CAMERA_INFORMATION_DATA::NAME, CAMERA_INFORMATION_DATA::ID),
36035            (CAMERA_SETTINGS_DATA::NAME, CAMERA_SETTINGS_DATA::ID),
36036            (STORAGE_INFORMATION_DATA::NAME, STORAGE_INFORMATION_DATA::ID),
36037            (
36038                CAMERA_CAPTURE_STATUS_DATA::NAME,
36039                CAMERA_CAPTURE_STATUS_DATA::ID,
36040            ),
36041            (
36042                CAMERA_IMAGE_CAPTURED_DATA::NAME,
36043                CAMERA_IMAGE_CAPTURED_DATA::ID,
36044            ),
36045            (FLIGHT_INFORMATION_DATA::NAME, FLIGHT_INFORMATION_DATA::ID),
36046            (MOUNT_ORIENTATION_DATA::NAME, MOUNT_ORIENTATION_DATA::ID),
36047            (LOGGING_DATA_DATA::NAME, LOGGING_DATA_DATA::ID),
36048            (LOGGING_DATA_ACKED_DATA::NAME, LOGGING_DATA_ACKED_DATA::ID),
36049            (LOGGING_ACK_DATA::NAME, LOGGING_ACK_DATA::ID),
36050            (
36051                VIDEO_STREAM_INFORMATION_DATA::NAME,
36052                VIDEO_STREAM_INFORMATION_DATA::ID,
36053            ),
36054            (VIDEO_STREAM_STATUS_DATA::NAME, VIDEO_STREAM_STATUS_DATA::ID),
36055            (CAMERA_FOV_STATUS_DATA::NAME, CAMERA_FOV_STATUS_DATA::ID),
36056            (
36057                CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
36058                CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
36059            ),
36060            (
36061                CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
36062                CAMERA_TRACKING_GEO_STATUS_DATA::ID,
36063            ),
36064            (
36065                CAMERA_THERMAL_RANGE_DATA::NAME,
36066                CAMERA_THERMAL_RANGE_DATA::ID,
36067            ),
36068            (
36069                GIMBAL_MANAGER_INFORMATION_DATA::NAME,
36070                GIMBAL_MANAGER_INFORMATION_DATA::ID,
36071            ),
36072            (
36073                GIMBAL_MANAGER_STATUS_DATA::NAME,
36074                GIMBAL_MANAGER_STATUS_DATA::ID,
36075            ),
36076            (
36077                GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
36078                GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
36079            ),
36080            (
36081                GIMBAL_DEVICE_INFORMATION_DATA::NAME,
36082                GIMBAL_DEVICE_INFORMATION_DATA::ID,
36083            ),
36084            (
36085                GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
36086                GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
36087            ),
36088            (
36089                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
36090                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
36091            ),
36092            (
36093                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME,
36094                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID,
36095            ),
36096            (
36097                GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
36098                GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
36099            ),
36100            (
36101                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME,
36102                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID,
36103            ),
36104            (ESC_INFO_DATA::NAME, ESC_INFO_DATA::ID),
36105            (ESC_STATUS_DATA::NAME, ESC_STATUS_DATA::ID),
36106            (WIFI_CONFIG_AP_DATA::NAME, WIFI_CONFIG_AP_DATA::ID),
36107            (PROTOCOL_VERSION_DATA::NAME, PROTOCOL_VERSION_DATA::ID),
36108            (AIS_VESSEL_DATA::NAME, AIS_VESSEL_DATA::ID),
36109            (UAVCAN_NODE_STATUS_DATA::NAME, UAVCAN_NODE_STATUS_DATA::ID),
36110            (UAVCAN_NODE_INFO_DATA::NAME, UAVCAN_NODE_INFO_DATA::ID),
36111            (
36112                PARAM_EXT_REQUEST_READ_DATA::NAME,
36113                PARAM_EXT_REQUEST_READ_DATA::ID,
36114            ),
36115            (
36116                PARAM_EXT_REQUEST_LIST_DATA::NAME,
36117                PARAM_EXT_REQUEST_LIST_DATA::ID,
36118            ),
36119            (PARAM_EXT_VALUE_DATA::NAME, PARAM_EXT_VALUE_DATA::ID),
36120            (PARAM_EXT_SET_DATA::NAME, PARAM_EXT_SET_DATA::ID),
36121            (PARAM_EXT_ACK_DATA::NAME, PARAM_EXT_ACK_DATA::ID),
36122            (OBSTACLE_DISTANCE_DATA::NAME, OBSTACLE_DISTANCE_DATA::ID),
36123            (ODOMETRY_DATA::NAME, ODOMETRY_DATA::ID),
36124            (
36125                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME,
36126                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID,
36127            ),
36128            (
36129                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME,
36130                TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
36131            ),
36132            (CELLULAR_STATUS_DATA::NAME, CELLULAR_STATUS_DATA::ID),
36133            (ISBD_LINK_STATUS_DATA::NAME, ISBD_LINK_STATUS_DATA::ID),
36134            (CELLULAR_CONFIG_DATA::NAME, CELLULAR_CONFIG_DATA::ID),
36135            (RAW_RPM_DATA::NAME, RAW_RPM_DATA::ID),
36136            (UTM_GLOBAL_POSITION_DATA::NAME, UTM_GLOBAL_POSITION_DATA::ID),
36137            (DEBUG_FLOAT_ARRAY_DATA::NAME, DEBUG_FLOAT_ARRAY_DATA::ID),
36138            (
36139                ORBIT_EXECUTION_STATUS_DATA::NAME,
36140                ORBIT_EXECUTION_STATUS_DATA::ID,
36141            ),
36142            (SMART_BATTERY_INFO_DATA::NAME, SMART_BATTERY_INFO_DATA::ID),
36143            (FUEL_STATUS_DATA::NAME, FUEL_STATUS_DATA::ID),
36144            (BATTERY_INFO_DATA::NAME, BATTERY_INFO_DATA::ID),
36145            (GENERATOR_STATUS_DATA::NAME, GENERATOR_STATUS_DATA::ID),
36146            (
36147                ACTUATOR_OUTPUT_STATUS_DATA::NAME,
36148                ACTUATOR_OUTPUT_STATUS_DATA::ID,
36149            ),
36150            (
36151                TIME_ESTIMATE_TO_TARGET_DATA::NAME,
36152                TIME_ESTIMATE_TO_TARGET_DATA::ID,
36153            ),
36154            (TUNNEL_DATA::NAME, TUNNEL_DATA::ID),
36155            (CAN_FRAME_DATA::NAME, CAN_FRAME_DATA::ID),
36156            (CANFD_FRAME_DATA::NAME, CANFD_FRAME_DATA::ID),
36157            (CAN_FILTER_MODIFY_DATA::NAME, CAN_FILTER_MODIFY_DATA::ID),
36158            (
36159                ONBOARD_COMPUTER_STATUS_DATA::NAME,
36160                ONBOARD_COMPUTER_STATUS_DATA::ID,
36161            ),
36162            (
36163                COMPONENT_INFORMATION_DATA::NAME,
36164                COMPONENT_INFORMATION_DATA::ID,
36165            ),
36166            (
36167                COMPONENT_INFORMATION_BASIC_DATA::NAME,
36168                COMPONENT_INFORMATION_BASIC_DATA::ID,
36169            ),
36170            (COMPONENT_METADATA_DATA::NAME, COMPONENT_METADATA_DATA::ID),
36171            (PLAY_TUNE_V2_DATA::NAME, PLAY_TUNE_V2_DATA::ID),
36172            (SUPPORTED_TUNES_DATA::NAME, SUPPORTED_TUNES_DATA::ID),
36173            (EVENT_DATA::NAME, EVENT_DATA::ID),
36174            (
36175                CURRENT_EVENT_SEQUENCE_DATA::NAME,
36176                CURRENT_EVENT_SEQUENCE_DATA::ID,
36177            ),
36178            (REQUEST_EVENT_DATA::NAME, REQUEST_EVENT_DATA::ID),
36179            (
36180                RESPONSE_EVENT_ERROR_DATA::NAME,
36181                RESPONSE_EVENT_ERROR_DATA::ID,
36182            ),
36183            (AVAILABLE_MODES_DATA::NAME, AVAILABLE_MODES_DATA::ID),
36184            (CURRENT_MODE_DATA::NAME, CURRENT_MODE_DATA::ID),
36185            (
36186                AVAILABLE_MODES_MONITOR_DATA::NAME,
36187                AVAILABLE_MODES_MONITOR_DATA::ID,
36188            ),
36189            (ILLUMINATOR_STATUS_DATA::NAME, ILLUMINATOR_STATUS_DATA::ID),
36190            (WHEEL_DISTANCE_DATA::NAME, WHEEL_DISTANCE_DATA::ID),
36191            (WINCH_STATUS_DATA::NAME, WINCH_STATUS_DATA::ID),
36192            (
36193                OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
36194                OPEN_DRONE_ID_BASIC_ID_DATA::ID,
36195            ),
36196            (
36197                OPEN_DRONE_ID_LOCATION_DATA::NAME,
36198                OPEN_DRONE_ID_LOCATION_DATA::ID,
36199            ),
36200            (
36201                OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
36202                OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
36203            ),
36204            (
36205                OPEN_DRONE_ID_SELF_ID_DATA::NAME,
36206                OPEN_DRONE_ID_SELF_ID_DATA::ID,
36207            ),
36208            (
36209                OPEN_DRONE_ID_SYSTEM_DATA::NAME,
36210                OPEN_DRONE_ID_SYSTEM_DATA::ID,
36211            ),
36212            (
36213                OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
36214                OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
36215            ),
36216            (
36217                OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
36218                OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
36219            ),
36220            (
36221                OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
36222                OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
36223            ),
36224            (
36225                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
36226                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
36227            ),
36228            (HYGROMETER_SENSOR_DATA::NAME, HYGROMETER_SENSOR_DATA::ID),
36229            (ARRAY_TEST_0_DATA::NAME, ARRAY_TEST_0_DATA::ID),
36230            (ARRAY_TEST_1_DATA::NAME, ARRAY_TEST_1_DATA::ID),
36231            (ARRAY_TEST_3_DATA::NAME, ARRAY_TEST_3_DATA::ID),
36232            (ARRAY_TEST_4_DATA::NAME, ARRAY_TEST_4_DATA::ID),
36233            (ARRAY_TEST_5_DATA::NAME, ARRAY_TEST_5_DATA::ID),
36234            (ARRAY_TEST_6_DATA::NAME, ARRAY_TEST_6_DATA::ID),
36235            (ARRAY_TEST_7_DATA::NAME, ARRAY_TEST_7_DATA::ID),
36236            (ARRAY_TEST_8_DATA::NAME, ARRAY_TEST_8_DATA::ID),
36237        ]
36238    }
36239}
36240impl Message for MavMessage {
36241    fn parse(
36242        version: MavlinkVersion,
36243        id: u32,
36244        payload: &[u8],
36245    ) -> Result<Self, ::mavlink_core::error::ParserError> {
36246        match id {
36247            ACTUATOR_CONTROL_TARGET_DATA::ID => {
36248                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
36249                    .map(Self::ACTUATOR_CONTROL_TARGET)
36250            }
36251            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
36252                .map(Self::ACTUATOR_OUTPUT_STATUS),
36253            ADSB_VEHICLE_DATA::ID => {
36254                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
36255            }
36256            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
36257            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
36258            ARRAY_TEST_0_DATA::ID => {
36259                ARRAY_TEST_0_DATA::deser(version, payload).map(Self::ARRAY_TEST_0)
36260            }
36261            ARRAY_TEST_1_DATA::ID => {
36262                ARRAY_TEST_1_DATA::deser(version, payload).map(Self::ARRAY_TEST_1)
36263            }
36264            ARRAY_TEST_3_DATA::ID => {
36265                ARRAY_TEST_3_DATA::deser(version, payload).map(Self::ARRAY_TEST_3)
36266            }
36267            ARRAY_TEST_4_DATA::ID => {
36268                ARRAY_TEST_4_DATA::deser(version, payload).map(Self::ARRAY_TEST_4)
36269            }
36270            ARRAY_TEST_5_DATA::ID => {
36271                ARRAY_TEST_5_DATA::deser(version, payload).map(Self::ARRAY_TEST_5)
36272            }
36273            ARRAY_TEST_6_DATA::ID => {
36274                ARRAY_TEST_6_DATA::deser(version, payload).map(Self::ARRAY_TEST_6)
36275            }
36276            ARRAY_TEST_7_DATA::ID => {
36277                ARRAY_TEST_7_DATA::deser(version, payload).map(Self::ARRAY_TEST_7)
36278            }
36279            ARRAY_TEST_8_DATA::ID => {
36280                ARRAY_TEST_8_DATA::deser(version, payload).map(Self::ARRAY_TEST_8)
36281            }
36282            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
36283            ATTITUDE_QUATERNION_DATA::ID => {
36284                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
36285            }
36286            ATTITUDE_QUATERNION_COV_DATA::ID => {
36287                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
36288                    .map(Self::ATTITUDE_QUATERNION_COV)
36289            }
36290            ATTITUDE_TARGET_DATA::ID => {
36291                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
36292            }
36293            ATT_POS_MOCAP_DATA::ID => {
36294                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
36295            }
36296            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
36297            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
36298                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
36299                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
36300            }
36301            AUTOPILOT_VERSION_DATA::ID => {
36302                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
36303            }
36304            AVAILABLE_MODES_DATA::ID => {
36305                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
36306            }
36307            AVAILABLE_MODES_MONITOR_DATA::ID => {
36308                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
36309                    .map(Self::AVAILABLE_MODES_MONITOR)
36310            }
36311            BATTERY_INFO_DATA::ID => {
36312                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
36313            }
36314            BATTERY_STATUS_DATA::ID => {
36315                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
36316            }
36317            BUTTON_CHANGE_DATA::ID => {
36318                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
36319            }
36320            CAMERA_CAPTURE_STATUS_DATA::ID => {
36321                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
36322            }
36323            CAMERA_FOV_STATUS_DATA::ID => {
36324                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
36325            }
36326            CAMERA_IMAGE_CAPTURED_DATA::ID => {
36327                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
36328            }
36329            CAMERA_INFORMATION_DATA::ID => {
36330                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
36331            }
36332            CAMERA_SETTINGS_DATA::ID => {
36333                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
36334            }
36335            CAMERA_THERMAL_RANGE_DATA::ID => {
36336                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
36337            }
36338            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
36339                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
36340                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
36341            }
36342            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
36343                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
36344                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
36345            }
36346            CAMERA_TRIGGER_DATA::ID => {
36347                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
36348            }
36349            CANFD_FRAME_DATA::ID => {
36350                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
36351            }
36352            CAN_FILTER_MODIFY_DATA::ID => {
36353                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
36354            }
36355            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
36356            CELLULAR_CONFIG_DATA::ID => {
36357                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
36358            }
36359            CELLULAR_STATUS_DATA::ID => {
36360                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
36361            }
36362            CHANGE_OPERATOR_CONTROL_DATA::ID => {
36363                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
36364                    .map(Self::CHANGE_OPERATOR_CONTROL)
36365            }
36366            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
36367                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
36368                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
36369            }
36370            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
36371            COMMAND_ACK_DATA::ID => {
36372                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
36373            }
36374            COMMAND_CANCEL_DATA::ID => {
36375                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
36376            }
36377            COMMAND_INT_DATA::ID => {
36378                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
36379            }
36380            COMMAND_LONG_DATA::ID => {
36381                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
36382            }
36383            COMPONENT_INFORMATION_DATA::ID => {
36384                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
36385            }
36386            COMPONENT_INFORMATION_BASIC_DATA::ID => {
36387                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
36388                    .map(Self::COMPONENT_INFORMATION_BASIC)
36389            }
36390            COMPONENT_METADATA_DATA::ID => {
36391                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
36392            }
36393            CONTROL_SYSTEM_STATE_DATA::ID => {
36394                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
36395            }
36396            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
36397                .map(Self::CURRENT_EVENT_SEQUENCE),
36398            CURRENT_MODE_DATA::ID => {
36399                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
36400            }
36401            DATA_STREAM_DATA::ID => {
36402                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
36403            }
36404            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
36405                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
36406                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
36407            }
36408            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
36409            DEBUG_FLOAT_ARRAY_DATA::ID => {
36410                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
36411            }
36412            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
36413            DISTANCE_SENSOR_DATA::ID => {
36414                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
36415            }
36416            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
36417            ENCAPSULATED_DATA_DATA::ID => {
36418                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
36419            }
36420            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
36421            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
36422            ESTIMATOR_STATUS_DATA::ID => {
36423                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
36424            }
36425            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
36426            EXTENDED_SYS_STATE_DATA::ID => {
36427                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
36428            }
36429            FENCE_STATUS_DATA::ID => {
36430                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
36431            }
36432            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
36433                .map(Self::FILE_TRANSFER_PROTOCOL),
36434            FLIGHT_INFORMATION_DATA::ID => {
36435                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
36436            }
36437            FOLLOW_TARGET_DATA::ID => {
36438                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
36439            }
36440            FUEL_STATUS_DATA::ID => {
36441                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
36442            }
36443            GENERATOR_STATUS_DATA::ID => {
36444                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
36445            }
36446            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
36447                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
36448                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
36449            }
36450            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
36451                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
36452                    .map(Self::GIMBAL_DEVICE_INFORMATION)
36453            }
36454            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
36455                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
36456                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
36457            }
36458            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
36459                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
36460                    .map(Self::GIMBAL_MANAGER_INFORMATION)
36461            }
36462            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
36463                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
36464                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
36465            }
36466            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36467                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
36468                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
36469            }
36470            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
36471                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
36472                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
36473            }
36474            GIMBAL_MANAGER_STATUS_DATA::ID => {
36475                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
36476            }
36477            GLOBAL_POSITION_INT_DATA::ID => {
36478                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
36479            }
36480            GLOBAL_POSITION_INT_COV_DATA::ID => {
36481                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
36482                    .map(Self::GLOBAL_POSITION_INT_COV)
36483            }
36484            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36485                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
36486                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
36487            }
36488            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
36489            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
36490            GPS_GLOBAL_ORIGIN_DATA::ID => {
36491                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
36492            }
36493            GPS_INJECT_DATA_DATA::ID => {
36494                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
36495            }
36496            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
36497            GPS_RAW_INT_DATA::ID => {
36498                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
36499            }
36500            GPS_RTCM_DATA_DATA::ID => {
36501                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
36502            }
36503            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
36504            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
36505            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
36506            HIGHRES_IMU_DATA::ID => {
36507                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
36508            }
36509            HIGH_LATENCY_DATA::ID => {
36510                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
36511            }
36512            HIGH_LATENCY2_DATA::ID => {
36513                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
36514            }
36515            HIL_ACTUATOR_CONTROLS_DATA::ID => {
36516                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
36517            }
36518            HIL_CONTROLS_DATA::ID => {
36519                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
36520            }
36521            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
36522            HIL_OPTICAL_FLOW_DATA::ID => {
36523                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
36524            }
36525            HIL_RC_INPUTS_RAW_DATA::ID => {
36526                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
36527            }
36528            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
36529            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
36530            HIL_STATE_QUATERNION_DATA::ID => {
36531                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
36532            }
36533            HOME_POSITION_DATA::ID => {
36534                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
36535            }
36536            HYGROMETER_SENSOR_DATA::ID => {
36537                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
36538            }
36539            ILLUMINATOR_STATUS_DATA::ID => {
36540                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
36541            }
36542            ISBD_LINK_STATUS_DATA::ID => {
36543                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
36544            }
36545            LANDING_TARGET_DATA::ID => {
36546                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
36547            }
36548            LINK_NODE_STATUS_DATA::ID => {
36549                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
36550            }
36551            LOCAL_POSITION_NED_DATA::ID => {
36552                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
36553            }
36554            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
36555                .map(Self::LOCAL_POSITION_NED_COV),
36556            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36557                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
36558                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
36559            }
36560            LOGGING_ACK_DATA::ID => {
36561                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
36562            }
36563            LOGGING_DATA_DATA::ID => {
36564                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
36565            }
36566            LOGGING_DATA_ACKED_DATA::ID => {
36567                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
36568            }
36569            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
36570            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
36571            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
36572            LOG_REQUEST_DATA_DATA::ID => {
36573                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
36574            }
36575            LOG_REQUEST_END_DATA::ID => {
36576                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
36577            }
36578            LOG_REQUEST_LIST_DATA::ID => {
36579                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
36580            }
36581            MAG_CAL_REPORT_DATA::ID => {
36582                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
36583            }
36584            MANUAL_CONTROL_DATA::ID => {
36585                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
36586            }
36587            MANUAL_SETPOINT_DATA::ID => {
36588                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
36589            }
36590            MEMORY_VECT_DATA::ID => {
36591                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
36592            }
36593            MESSAGE_INTERVAL_DATA::ID => {
36594                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
36595            }
36596            MISSION_ACK_DATA::ID => {
36597                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
36598            }
36599            MISSION_CLEAR_ALL_DATA::ID => {
36600                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
36601            }
36602            MISSION_COUNT_DATA::ID => {
36603                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
36604            }
36605            MISSION_CURRENT_DATA::ID => {
36606                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
36607            }
36608            MISSION_ITEM_DATA::ID => {
36609                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
36610            }
36611            MISSION_ITEM_INT_DATA::ID => {
36612                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
36613            }
36614            MISSION_ITEM_REACHED_DATA::ID => {
36615                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
36616            }
36617            MISSION_REQUEST_DATA::ID => {
36618                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
36619            }
36620            MISSION_REQUEST_INT_DATA::ID => {
36621                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
36622            }
36623            MISSION_REQUEST_LIST_DATA::ID => {
36624                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
36625            }
36626            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
36627                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
36628                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
36629            }
36630            MISSION_SET_CURRENT_DATA::ID => {
36631                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
36632            }
36633            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
36634                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
36635                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
36636            }
36637            MOUNT_ORIENTATION_DATA::ID => {
36638                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
36639            }
36640            NAMED_VALUE_FLOAT_DATA::ID => {
36641                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
36642            }
36643            NAMED_VALUE_INT_DATA::ID => {
36644                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
36645            }
36646            NAV_CONTROLLER_OUTPUT_DATA::ID => {
36647                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
36648            }
36649            OBSTACLE_DISTANCE_DATA::ID => {
36650                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
36651            }
36652            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
36653            ONBOARD_COMPUTER_STATUS_DATA::ID => {
36654                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
36655                    .map(Self::ONBOARD_COMPUTER_STATUS)
36656            }
36657            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
36658                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
36659                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
36660            }
36661            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
36662                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
36663                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
36664            }
36665            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
36666                .map(Self::OPEN_DRONE_ID_BASIC_ID),
36667            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
36668                .map(Self::OPEN_DRONE_ID_LOCATION),
36669            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
36670                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
36671                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
36672            }
36673            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
36674                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
36675                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
36676            }
36677            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
36678                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
36679            }
36680            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
36681                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
36682            }
36683            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
36684                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
36685                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
36686            }
36687            OPTICAL_FLOW_DATA::ID => {
36688                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
36689            }
36690            OPTICAL_FLOW_RAD_DATA::ID => {
36691                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
36692            }
36693            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
36694                .map(Self::ORBIT_EXECUTION_STATUS),
36695            PARAM_EXT_ACK_DATA::ID => {
36696                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
36697            }
36698            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
36699                .map(Self::PARAM_EXT_REQUEST_LIST),
36700            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
36701                .map(Self::PARAM_EXT_REQUEST_READ),
36702            PARAM_EXT_SET_DATA::ID => {
36703                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
36704            }
36705            PARAM_EXT_VALUE_DATA::ID => {
36706                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
36707            }
36708            PARAM_MAP_RC_DATA::ID => {
36709                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
36710            }
36711            PARAM_REQUEST_LIST_DATA::ID => {
36712                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
36713            }
36714            PARAM_REQUEST_READ_DATA::ID => {
36715                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
36716            }
36717            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
36718            PARAM_VALUE_DATA::ID => {
36719                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
36720            }
36721            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
36722            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
36723            PLAY_TUNE_V2_DATA::ID => {
36724                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
36725            }
36726            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
36727                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
36728                    .map(Self::POSITION_TARGET_GLOBAL_INT)
36729            }
36730            POSITION_TARGET_LOCAL_NED_DATA::ID => {
36731                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
36732                    .map(Self::POSITION_TARGET_LOCAL_NED)
36733            }
36734            POWER_STATUS_DATA::ID => {
36735                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
36736            }
36737            PROTOCOL_VERSION_DATA::ID => {
36738                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
36739            }
36740            RADIO_STATUS_DATA::ID => {
36741                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
36742            }
36743            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
36744            RAW_PRESSURE_DATA::ID => {
36745                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
36746            }
36747            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
36748            RC_CHANNELS_DATA::ID => {
36749                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
36750            }
36751            RC_CHANNELS_OVERRIDE_DATA::ID => {
36752                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
36753            }
36754            RC_CHANNELS_RAW_DATA::ID => {
36755                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
36756            }
36757            RC_CHANNELS_SCALED_DATA::ID => {
36758                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
36759            }
36760            REQUEST_DATA_STREAM_DATA::ID => {
36761                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
36762            }
36763            REQUEST_EVENT_DATA::ID => {
36764                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
36765            }
36766            RESOURCE_REQUEST_DATA::ID => {
36767                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
36768            }
36769            RESPONSE_EVENT_ERROR_DATA::ID => {
36770                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
36771            }
36772            SAFETY_ALLOWED_AREA_DATA::ID => {
36773                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
36774            }
36775            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
36776                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
36777                    .map(Self::SAFETY_SET_ALLOWED_AREA)
36778            }
36779            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
36780            SCALED_IMU2_DATA::ID => {
36781                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
36782            }
36783            SCALED_IMU3_DATA::ID => {
36784                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
36785            }
36786            SCALED_PRESSURE_DATA::ID => {
36787                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
36788            }
36789            SCALED_PRESSURE2_DATA::ID => {
36790                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
36791            }
36792            SCALED_PRESSURE3_DATA::ID => {
36793                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
36794            }
36795            SERIAL_CONTROL_DATA::ID => {
36796                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
36797            }
36798            SERVO_OUTPUT_RAW_DATA::ID => {
36799                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
36800            }
36801            SETUP_SIGNING_DATA::ID => {
36802                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
36803            }
36804            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
36805                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
36806                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
36807            }
36808            SET_ATTITUDE_TARGET_DATA::ID => {
36809                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
36810            }
36811            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
36812                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
36813            }
36814            SET_HOME_POSITION_DATA::ID => {
36815                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
36816            }
36817            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
36818            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
36819                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
36820                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
36821            }
36822            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
36823                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
36824                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
36825            }
36826            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
36827            SMART_BATTERY_INFO_DATA::ID => {
36828                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
36829            }
36830            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
36831            STORAGE_INFORMATION_DATA::ID => {
36832                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
36833            }
36834            SUPPORTED_TUNES_DATA::ID => {
36835                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
36836            }
36837            SYSTEM_TIME_DATA::ID => {
36838                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
36839            }
36840            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
36841            TERRAIN_CHECK_DATA::ID => {
36842                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
36843            }
36844            TERRAIN_DATA_DATA::ID => {
36845                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
36846            }
36847            TERRAIN_REPORT_DATA::ID => {
36848                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
36849            }
36850            TERRAIN_REQUEST_DATA::ID => {
36851                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
36852            }
36853            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
36854            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
36855                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
36856                    .map(Self::TIME_ESTIMATE_TO_TARGET)
36857            }
36858            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
36859                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
36860                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
36861            }
36862            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
36863                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
36864                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
36865            }
36866            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
36867            UAVCAN_NODE_INFO_DATA::ID => {
36868                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
36869            }
36870            UAVCAN_NODE_STATUS_DATA::ID => {
36871                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
36872            }
36873            UTM_GLOBAL_POSITION_DATA::ID => {
36874                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
36875            }
36876            V2_EXTENSION_DATA::ID => {
36877                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
36878            }
36879            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
36880            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
36881            VICON_POSITION_ESTIMATE_DATA::ID => {
36882                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
36883                    .map(Self::VICON_POSITION_ESTIMATE)
36884            }
36885            VIDEO_STREAM_INFORMATION_DATA::ID => {
36886                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
36887                    .map(Self::VIDEO_STREAM_INFORMATION)
36888            }
36889            VIDEO_STREAM_STATUS_DATA::ID => {
36890                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
36891            }
36892            VISION_POSITION_ESTIMATE_DATA::ID => {
36893                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
36894                    .map(Self::VISION_POSITION_ESTIMATE)
36895            }
36896            VISION_SPEED_ESTIMATE_DATA::ID => {
36897                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
36898            }
36899            WHEEL_DISTANCE_DATA::ID => {
36900                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
36901            }
36902            WIFI_CONFIG_AP_DATA::ID => {
36903                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
36904            }
36905            WINCH_STATUS_DATA::ID => {
36906                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
36907            }
36908            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
36909            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
36910        }
36911    }
36912    fn message_name(&self) -> &'static str {
36913        match self {
36914            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
36915            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
36916            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
36917            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
36918            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
36919            Self::ARRAY_TEST_0(..) => ARRAY_TEST_0_DATA::NAME,
36920            Self::ARRAY_TEST_1(..) => ARRAY_TEST_1_DATA::NAME,
36921            Self::ARRAY_TEST_3(..) => ARRAY_TEST_3_DATA::NAME,
36922            Self::ARRAY_TEST_4(..) => ARRAY_TEST_4_DATA::NAME,
36923            Self::ARRAY_TEST_5(..) => ARRAY_TEST_5_DATA::NAME,
36924            Self::ARRAY_TEST_6(..) => ARRAY_TEST_6_DATA::NAME,
36925            Self::ARRAY_TEST_7(..) => ARRAY_TEST_7_DATA::NAME,
36926            Self::ARRAY_TEST_8(..) => ARRAY_TEST_8_DATA::NAME,
36927            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
36928            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
36929            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
36930            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
36931            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
36932            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
36933            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
36934                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
36935            }
36936            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
36937            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
36938            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
36939            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
36940            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
36941            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
36942            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
36943            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
36944            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
36945            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
36946            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
36947            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
36948            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
36949            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
36950            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
36951            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
36952            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
36953            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
36954            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
36955            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
36956            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
36957            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
36958            Self::COLLISION(..) => COLLISION_DATA::NAME,
36959            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
36960            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
36961            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
36962            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
36963            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
36964            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
36965            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
36966            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
36967            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
36968            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
36969            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
36970            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
36971            Self::DEBUG(..) => DEBUG_DATA::NAME,
36972            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
36973            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
36974            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
36975            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
36976            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
36977            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
36978            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
36979            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
36980            Self::EVENT(..) => EVENT_DATA::NAME,
36981            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
36982            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
36983            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
36984            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
36985            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
36986            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
36987            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
36988            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
36989            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
36990            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
36991            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
36992            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
36993            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
36994                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
36995            }
36996            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
36997            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
36998            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
36999            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
37000            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
37001            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
37002            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
37003            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
37004            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
37005            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
37006            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
37007            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
37008            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
37009            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
37010            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
37011            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
37012            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
37013            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
37014            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
37015            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
37016            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
37017            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
37018            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
37019            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
37020            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
37021            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
37022            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
37023            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
37024            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
37025            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
37026            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
37027            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
37028            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
37029            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
37030            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
37031                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
37032            }
37033            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
37034            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
37035            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
37036            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
37037            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
37038            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
37039            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
37040            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
37041            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
37042            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
37043            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
37044            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
37045            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
37046            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
37047            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
37048            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
37049            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
37050            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
37051            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
37052            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
37053            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
37054            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
37055            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
37056            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
37057            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
37058            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
37059            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
37060            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
37061            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
37062            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
37063            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
37064            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
37065            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
37066            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
37067            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
37068            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
37069            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
37070            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
37071            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
37072            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
37073            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
37074            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
37075            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
37076            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
37077            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
37078            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
37079            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
37080            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
37081            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
37082            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
37083            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
37084            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
37085            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
37086            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
37087            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
37088            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
37089            Self::PING(..) => PING_DATA::NAME,
37090            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
37091            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
37092            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
37093            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
37094            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
37095            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
37096            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
37097            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
37098            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
37099            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
37100            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
37101            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
37102            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
37103            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
37104            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
37105            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
37106            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
37107            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
37108            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
37109            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
37110            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
37111            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
37112            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
37113            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
37114            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
37115            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
37116            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
37117            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
37118            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
37119            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
37120            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
37121            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
37122            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
37123            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
37124            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
37125            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
37126            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
37127            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
37128            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
37129            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
37130            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
37131            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
37132            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
37133            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
37134            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
37135            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
37136            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
37137            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
37138            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
37139            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
37140                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
37141            }
37142            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
37143                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
37144            }
37145            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
37146            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
37147            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
37148            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
37149            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
37150            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
37151            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
37152            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
37153            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
37154            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
37155            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
37156            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
37157            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
37158            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
37159            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
37160            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
37161        }
37162    }
37163    fn message_id(&self) -> u32 {
37164        match self {
37165            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
37166            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
37167            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
37168            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
37169            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
37170            Self::ARRAY_TEST_0(..) => ARRAY_TEST_0_DATA::ID,
37171            Self::ARRAY_TEST_1(..) => ARRAY_TEST_1_DATA::ID,
37172            Self::ARRAY_TEST_3(..) => ARRAY_TEST_3_DATA::ID,
37173            Self::ARRAY_TEST_4(..) => ARRAY_TEST_4_DATA::ID,
37174            Self::ARRAY_TEST_5(..) => ARRAY_TEST_5_DATA::ID,
37175            Self::ARRAY_TEST_6(..) => ARRAY_TEST_6_DATA::ID,
37176            Self::ARRAY_TEST_7(..) => ARRAY_TEST_7_DATA::ID,
37177            Self::ARRAY_TEST_8(..) => ARRAY_TEST_8_DATA::ID,
37178            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
37179            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
37180            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
37181            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
37182            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
37183            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
37184            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
37185                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
37186            }
37187            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
37188            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
37189            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
37190            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
37191            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
37192            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
37193            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
37194            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
37195            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
37196            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
37197            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
37198            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
37199            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
37200            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
37201            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
37202            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
37203            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
37204            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
37205            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
37206            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
37207            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
37208            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
37209            Self::COLLISION(..) => COLLISION_DATA::ID,
37210            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
37211            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
37212            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
37213            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
37214            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
37215            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
37216            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
37217            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
37218            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
37219            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
37220            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
37221            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
37222            Self::DEBUG(..) => DEBUG_DATA::ID,
37223            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
37224            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
37225            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
37226            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
37227            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
37228            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
37229            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
37230            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
37231            Self::EVENT(..) => EVENT_DATA::ID,
37232            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
37233            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
37234            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
37235            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
37236            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
37237            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
37238            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
37239            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
37240            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
37241            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
37242            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
37243            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
37244            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
37245                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
37246            }
37247            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
37248            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
37249            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
37250            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
37251            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
37252            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
37253            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
37254            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
37255            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
37256            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
37257            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
37258            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
37259            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
37260            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
37261            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
37262            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
37263            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
37264            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
37265            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
37266            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
37267            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
37268            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
37269            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
37270            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
37271            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
37272            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
37273            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
37274            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
37275            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
37276            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
37277            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
37278            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
37279            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
37280            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
37281            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
37282                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
37283            }
37284            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
37285            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
37286            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
37287            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
37288            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
37289            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
37290            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
37291            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
37292            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
37293            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
37294            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
37295            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
37296            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
37297            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
37298            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
37299            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
37300            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
37301            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
37302            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
37303            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
37304            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
37305            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
37306            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
37307            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
37308            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
37309            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
37310            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
37311            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
37312            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
37313            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
37314            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
37315            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
37316            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
37317            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
37318            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
37319            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
37320            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
37321            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
37322            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
37323            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
37324            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
37325            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
37326            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
37327            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
37328            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
37329            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
37330            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
37331            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
37332            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
37333            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
37334            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
37335            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
37336            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
37337            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
37338            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
37339            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
37340            Self::PING(..) => PING_DATA::ID,
37341            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
37342            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
37343            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
37344            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
37345            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
37346            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
37347            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
37348            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
37349            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
37350            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
37351            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
37352            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
37353            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
37354            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
37355            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
37356            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
37357            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
37358            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
37359            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
37360            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
37361            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
37362            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
37363            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
37364            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
37365            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
37366            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
37367            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
37368            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
37369            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
37370            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
37371            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
37372            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
37373            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
37374            Self::SET_MODE(..) => SET_MODE_DATA::ID,
37375            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
37376            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
37377            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
37378            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
37379            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
37380            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
37381            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
37382            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
37383            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
37384            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
37385            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
37386            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
37387            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
37388            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
37389            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
37390            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
37391            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
37392                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
37393            }
37394            Self::TUNNEL(..) => TUNNEL_DATA::ID,
37395            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
37396            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
37397            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
37398            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
37399            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
37400            Self::VIBRATION(..) => VIBRATION_DATA::ID,
37401            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
37402            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
37403            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
37404            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
37405            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
37406            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
37407            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
37408            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
37409            Self::WIND_COV(..) => WIND_COV_DATA::ID,
37410        }
37411    }
37412    fn message_id_from_name(name: &str) -> Option<u32> {
37413        match name {
37414            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
37415            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
37416            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
37417            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
37418            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
37419            ARRAY_TEST_0_DATA::NAME => Some(ARRAY_TEST_0_DATA::ID),
37420            ARRAY_TEST_1_DATA::NAME => Some(ARRAY_TEST_1_DATA::ID),
37421            ARRAY_TEST_3_DATA::NAME => Some(ARRAY_TEST_3_DATA::ID),
37422            ARRAY_TEST_4_DATA::NAME => Some(ARRAY_TEST_4_DATA::ID),
37423            ARRAY_TEST_5_DATA::NAME => Some(ARRAY_TEST_5_DATA::ID),
37424            ARRAY_TEST_6_DATA::NAME => Some(ARRAY_TEST_6_DATA::ID),
37425            ARRAY_TEST_7_DATA::NAME => Some(ARRAY_TEST_7_DATA::ID),
37426            ARRAY_TEST_8_DATA::NAME => Some(ARRAY_TEST_8_DATA::ID),
37427            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
37428            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
37429            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
37430            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
37431            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
37432            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
37433            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
37434                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
37435            }
37436            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
37437            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
37438            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
37439            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
37440            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
37441            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
37442            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
37443            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
37444            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
37445            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
37446            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
37447            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
37448            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
37449            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
37450            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
37451            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
37452            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
37453            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
37454            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
37455            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
37456            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
37457            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
37458            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
37459            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
37460            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
37461            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
37462            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
37463            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
37464            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
37465            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
37466            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
37467            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
37468            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
37469            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
37470            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
37471            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
37472            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
37473            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
37474            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
37475            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
37476            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
37477            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
37478            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
37479            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
37480            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
37481            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
37482            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
37483            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
37484            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
37485            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
37486            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
37487            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
37488            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
37489                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
37490            }
37491            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
37492            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
37493            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
37494            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
37495            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
37496                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
37497            }
37498            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
37499            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
37500            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
37501            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
37502            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
37503                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
37504            }
37505            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
37506            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
37507            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
37508            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
37509            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
37510            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
37511            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
37512            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
37513            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
37514            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
37515            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
37516            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
37517            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
37518            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
37519            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
37520            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
37521            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
37522            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
37523            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
37524            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
37525            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
37526            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
37527            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
37528            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
37529            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
37530            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
37531            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
37532            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
37533            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
37534            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
37535                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
37536            }
37537            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
37538            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
37539            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
37540            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
37541            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
37542            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
37543            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
37544            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
37545            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
37546            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
37547            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
37548            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
37549            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
37550            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
37551            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
37552            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
37553            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
37554            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
37555            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
37556            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
37557            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
37558            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
37559            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
37560            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
37561            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
37562            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
37563            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
37564            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
37565            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
37566            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
37567            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
37568            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
37569            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
37570            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
37571            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
37572            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
37573            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
37574            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
37575            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
37576            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
37577            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
37578            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
37579            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
37580            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
37581            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
37582            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
37583            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
37584            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
37585            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
37586            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
37587            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
37588            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
37589            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
37590            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
37591            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
37592            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
37593            PING_DATA::NAME => Some(PING_DATA::ID),
37594            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
37595            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
37596            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
37597            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
37598            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
37599            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
37600            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
37601            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
37602            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
37603            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
37604            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
37605            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
37606            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
37607            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
37608            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
37609            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
37610            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
37611            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
37612            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
37613            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
37614            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
37615            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
37616            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
37617            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
37618            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
37619            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
37620            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
37621            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
37622            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
37623            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
37624            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
37625            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
37626            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
37627            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
37628            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
37629                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
37630            }
37631            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
37632                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
37633            }
37634            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
37635            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
37636            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
37637            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
37638            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
37639            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
37640            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
37641            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
37642            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
37643            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
37644            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
37645            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
37646            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
37647            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
37648                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
37649            }
37650            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
37651                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
37652            }
37653            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
37654            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
37655            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
37656            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
37657            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
37658            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
37659            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
37660            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
37661            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
37662            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
37663            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
37664            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
37665            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
37666            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
37667            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
37668            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
37669            _ => None,
37670        }
37671    }
37672    fn default_message_from_id(id: u32) -> Option<Self> {
37673        match id {
37674            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
37675                ACTUATOR_CONTROL_TARGET_DATA::default(),
37676            )),
37677            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
37678                ACTUATOR_OUTPUT_STATUS_DATA::default(),
37679            )),
37680            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
37681            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
37682            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
37683            ARRAY_TEST_0_DATA::ID => Some(Self::ARRAY_TEST_0(ARRAY_TEST_0_DATA::default())),
37684            ARRAY_TEST_1_DATA::ID => Some(Self::ARRAY_TEST_1(ARRAY_TEST_1_DATA::default())),
37685            ARRAY_TEST_3_DATA::ID => Some(Self::ARRAY_TEST_3(ARRAY_TEST_3_DATA::default())),
37686            ARRAY_TEST_4_DATA::ID => Some(Self::ARRAY_TEST_4(ARRAY_TEST_4_DATA::default())),
37687            ARRAY_TEST_5_DATA::ID => Some(Self::ARRAY_TEST_5(ARRAY_TEST_5_DATA::default())),
37688            ARRAY_TEST_6_DATA::ID => Some(Self::ARRAY_TEST_6(ARRAY_TEST_6_DATA::default())),
37689            ARRAY_TEST_7_DATA::ID => Some(Self::ARRAY_TEST_7(ARRAY_TEST_7_DATA::default())),
37690            ARRAY_TEST_8_DATA::ID => Some(Self::ARRAY_TEST_8(ARRAY_TEST_8_DATA::default())),
37691            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
37692            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
37693                ATTITUDE_QUATERNION_DATA::default(),
37694            )),
37695            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
37696                ATTITUDE_QUATERNION_COV_DATA::default(),
37697            )),
37698            ATTITUDE_TARGET_DATA::ID => {
37699                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
37700            }
37701            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
37702            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
37703            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
37704                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
37705                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
37706                ))
37707            }
37708            AUTOPILOT_VERSION_DATA::ID => {
37709                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
37710            }
37711            AVAILABLE_MODES_DATA::ID => {
37712                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
37713            }
37714            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
37715                AVAILABLE_MODES_MONITOR_DATA::default(),
37716            )),
37717            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
37718            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
37719            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
37720            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
37721                CAMERA_CAPTURE_STATUS_DATA::default(),
37722            )),
37723            CAMERA_FOV_STATUS_DATA::ID => {
37724                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
37725            }
37726            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
37727                CAMERA_IMAGE_CAPTURED_DATA::default(),
37728            )),
37729            CAMERA_INFORMATION_DATA::ID => {
37730                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
37731            }
37732            CAMERA_SETTINGS_DATA::ID => {
37733                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
37734            }
37735            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
37736                CAMERA_THERMAL_RANGE_DATA::default(),
37737            )),
37738            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
37739                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
37740            )),
37741            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
37742                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
37743            )),
37744            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
37745            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
37746            CAN_FILTER_MODIFY_DATA::ID => {
37747                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
37748            }
37749            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
37750            CELLULAR_CONFIG_DATA::ID => {
37751                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
37752            }
37753            CELLULAR_STATUS_DATA::ID => {
37754                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
37755            }
37756            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
37757                CHANGE_OPERATOR_CONTROL_DATA::default(),
37758            )),
37759            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
37760                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
37761            )),
37762            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
37763            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
37764            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
37765            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
37766            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
37767            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
37768                COMPONENT_INFORMATION_DATA::default(),
37769            )),
37770            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
37771                COMPONENT_INFORMATION_BASIC_DATA::default(),
37772            )),
37773            COMPONENT_METADATA_DATA::ID => {
37774                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
37775            }
37776            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
37777                CONTROL_SYSTEM_STATE_DATA::default(),
37778            )),
37779            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
37780                CURRENT_EVENT_SEQUENCE_DATA::default(),
37781            )),
37782            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
37783            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
37784            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
37785                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
37786            )),
37787            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
37788            DEBUG_FLOAT_ARRAY_DATA::ID => {
37789                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
37790            }
37791            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
37792            DISTANCE_SENSOR_DATA::ID => {
37793                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
37794            }
37795            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
37796            ENCAPSULATED_DATA_DATA::ID => {
37797                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
37798            }
37799            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
37800            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
37801            ESTIMATOR_STATUS_DATA::ID => {
37802                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
37803            }
37804            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
37805            EXTENDED_SYS_STATE_DATA::ID => {
37806                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
37807            }
37808            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
37809            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
37810                FILE_TRANSFER_PROTOCOL_DATA::default(),
37811            )),
37812            FLIGHT_INFORMATION_DATA::ID => {
37813                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
37814            }
37815            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
37816            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
37817            GENERATOR_STATUS_DATA::ID => {
37818                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
37819            }
37820            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
37821                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
37822            )),
37823            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
37824                GIMBAL_DEVICE_INFORMATION_DATA::default(),
37825            )),
37826            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
37827                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
37828            )),
37829            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
37830                GIMBAL_MANAGER_INFORMATION_DATA::default(),
37831            )),
37832            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
37833                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
37834            )),
37835            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
37836                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
37837                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
37838                ))
37839            }
37840            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
37841                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
37842            )),
37843            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
37844                GIMBAL_MANAGER_STATUS_DATA::default(),
37845            )),
37846            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
37847                GLOBAL_POSITION_INT_DATA::default(),
37848            )),
37849            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
37850                GLOBAL_POSITION_INT_COV_DATA::default(),
37851            )),
37852            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
37853                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
37854                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
37855                ))
37856            }
37857            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
37858            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
37859            GPS_GLOBAL_ORIGIN_DATA::ID => {
37860                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
37861            }
37862            GPS_INJECT_DATA_DATA::ID => {
37863                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
37864            }
37865            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
37866            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
37867            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
37868            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
37869            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
37870            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
37871            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
37872            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
37873            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
37874            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
37875                HIL_ACTUATOR_CONTROLS_DATA::default(),
37876            )),
37877            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
37878            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
37879            HIL_OPTICAL_FLOW_DATA::ID => {
37880                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
37881            }
37882            HIL_RC_INPUTS_RAW_DATA::ID => {
37883                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
37884            }
37885            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
37886            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
37887            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
37888                HIL_STATE_QUATERNION_DATA::default(),
37889            )),
37890            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
37891            HYGROMETER_SENSOR_DATA::ID => {
37892                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
37893            }
37894            ILLUMINATOR_STATUS_DATA::ID => {
37895                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
37896            }
37897            ISBD_LINK_STATUS_DATA::ID => {
37898                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
37899            }
37900            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
37901            LINK_NODE_STATUS_DATA::ID => {
37902                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
37903            }
37904            LOCAL_POSITION_NED_DATA::ID => {
37905                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
37906            }
37907            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
37908                LOCAL_POSITION_NED_COV_DATA::default(),
37909            )),
37910            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
37911                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
37912                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
37913                ))
37914            }
37915            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
37916            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
37917            LOGGING_DATA_ACKED_DATA::ID => {
37918                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
37919            }
37920            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
37921            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
37922            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
37923            LOG_REQUEST_DATA_DATA::ID => {
37924                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
37925            }
37926            LOG_REQUEST_END_DATA::ID => {
37927                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
37928            }
37929            LOG_REQUEST_LIST_DATA::ID => {
37930                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
37931            }
37932            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
37933            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
37934            MANUAL_SETPOINT_DATA::ID => {
37935                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
37936            }
37937            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
37938            MESSAGE_INTERVAL_DATA::ID => {
37939                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
37940            }
37941            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
37942            MISSION_CLEAR_ALL_DATA::ID => {
37943                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
37944            }
37945            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
37946            MISSION_CURRENT_DATA::ID => {
37947                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
37948            }
37949            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
37950            MISSION_ITEM_INT_DATA::ID => {
37951                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
37952            }
37953            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
37954                MISSION_ITEM_REACHED_DATA::default(),
37955            )),
37956            MISSION_REQUEST_DATA::ID => {
37957                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
37958            }
37959            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
37960                MISSION_REQUEST_INT_DATA::default(),
37961            )),
37962            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
37963                MISSION_REQUEST_LIST_DATA::default(),
37964            )),
37965            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
37966                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
37967            )),
37968            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
37969                MISSION_SET_CURRENT_DATA::default(),
37970            )),
37971            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
37972                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
37973            )),
37974            MOUNT_ORIENTATION_DATA::ID => {
37975                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
37976            }
37977            NAMED_VALUE_FLOAT_DATA::ID => {
37978                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
37979            }
37980            NAMED_VALUE_INT_DATA::ID => {
37981                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
37982            }
37983            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
37984                NAV_CONTROLLER_OUTPUT_DATA::default(),
37985            )),
37986            OBSTACLE_DISTANCE_DATA::ID => {
37987                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
37988            }
37989            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
37990            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
37991                ONBOARD_COMPUTER_STATUS_DATA::default(),
37992            )),
37993            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
37994                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
37995            )),
37996            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
37997                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
37998            )),
37999            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
38000                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
38001            )),
38002            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
38003                OPEN_DRONE_ID_LOCATION_DATA::default(),
38004            )),
38005            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
38006                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
38007            )),
38008            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
38009                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
38010            )),
38011            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
38012                OPEN_DRONE_ID_SELF_ID_DATA::default(),
38013            )),
38014            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
38015                OPEN_DRONE_ID_SYSTEM_DATA::default(),
38016            )),
38017            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
38018                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
38019            )),
38020            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
38021            OPTICAL_FLOW_RAD_DATA::ID => {
38022                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
38023            }
38024            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
38025                ORBIT_EXECUTION_STATUS_DATA::default(),
38026            )),
38027            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
38028            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
38029                PARAM_EXT_REQUEST_LIST_DATA::default(),
38030            )),
38031            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
38032                PARAM_EXT_REQUEST_READ_DATA::default(),
38033            )),
38034            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
38035            PARAM_EXT_VALUE_DATA::ID => {
38036                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
38037            }
38038            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
38039            PARAM_REQUEST_LIST_DATA::ID => {
38040                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
38041            }
38042            PARAM_REQUEST_READ_DATA::ID => {
38043                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
38044            }
38045            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
38046            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
38047            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
38048            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
38049            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
38050            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
38051                POSITION_TARGET_GLOBAL_INT_DATA::default(),
38052            )),
38053            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
38054                POSITION_TARGET_LOCAL_NED_DATA::default(),
38055            )),
38056            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
38057            PROTOCOL_VERSION_DATA::ID => {
38058                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
38059            }
38060            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
38061            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
38062            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
38063            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
38064            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
38065            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
38066                RC_CHANNELS_OVERRIDE_DATA::default(),
38067            )),
38068            RC_CHANNELS_RAW_DATA::ID => {
38069                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
38070            }
38071            RC_CHANNELS_SCALED_DATA::ID => {
38072                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
38073            }
38074            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
38075                REQUEST_DATA_STREAM_DATA::default(),
38076            )),
38077            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
38078            RESOURCE_REQUEST_DATA::ID => {
38079                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
38080            }
38081            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
38082                RESPONSE_EVENT_ERROR_DATA::default(),
38083            )),
38084            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
38085                SAFETY_ALLOWED_AREA_DATA::default(),
38086            )),
38087            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
38088                SAFETY_SET_ALLOWED_AREA_DATA::default(),
38089            )),
38090            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
38091            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
38092            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
38093            SCALED_PRESSURE_DATA::ID => {
38094                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
38095            }
38096            SCALED_PRESSURE2_DATA::ID => {
38097                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
38098            }
38099            SCALED_PRESSURE3_DATA::ID => {
38100                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
38101            }
38102            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
38103            SERVO_OUTPUT_RAW_DATA::ID => {
38104                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
38105            }
38106            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
38107            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
38108                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
38109            )),
38110            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
38111                SET_ATTITUDE_TARGET_DATA::default(),
38112            )),
38113            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
38114                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
38115            )),
38116            SET_HOME_POSITION_DATA::ID => {
38117                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
38118            }
38119            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
38120            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
38121                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
38122            )),
38123            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
38124                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
38125            )),
38126            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
38127            SMART_BATTERY_INFO_DATA::ID => {
38128                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
38129            }
38130            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
38131            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
38132                STORAGE_INFORMATION_DATA::default(),
38133            )),
38134            SUPPORTED_TUNES_DATA::ID => {
38135                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
38136            }
38137            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
38138            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
38139            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
38140            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
38141            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
38142            TERRAIN_REQUEST_DATA::ID => {
38143                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
38144            }
38145            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
38146            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
38147                TIME_ESTIMATE_TO_TARGET_DATA::default(),
38148            )),
38149            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
38150                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
38151                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
38152                ))
38153            }
38154            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
38155                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
38156                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
38157                ))
38158            }
38159            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
38160            UAVCAN_NODE_INFO_DATA::ID => {
38161                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
38162            }
38163            UAVCAN_NODE_STATUS_DATA::ID => {
38164                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
38165            }
38166            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
38167                UTM_GLOBAL_POSITION_DATA::default(),
38168            )),
38169            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
38170            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
38171            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
38172            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
38173                VICON_POSITION_ESTIMATE_DATA::default(),
38174            )),
38175            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
38176                VIDEO_STREAM_INFORMATION_DATA::default(),
38177            )),
38178            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
38179                VIDEO_STREAM_STATUS_DATA::default(),
38180            )),
38181            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
38182                VISION_POSITION_ESTIMATE_DATA::default(),
38183            )),
38184            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
38185                VISION_SPEED_ESTIMATE_DATA::default(),
38186            )),
38187            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
38188            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
38189            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
38190            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
38191            _ => None,
38192        }
38193    }
38194    #[cfg(feature = "arbitrary")]
38195    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
38196        match id {
38197            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
38198                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
38199            )),
38200            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
38201                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
38202            )),
38203            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
38204            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
38205            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
38206            ARRAY_TEST_0_DATA::ID => Some(Self::ARRAY_TEST_0(ARRAY_TEST_0_DATA::random(rng))),
38207            ARRAY_TEST_1_DATA::ID => Some(Self::ARRAY_TEST_1(ARRAY_TEST_1_DATA::random(rng))),
38208            ARRAY_TEST_3_DATA::ID => Some(Self::ARRAY_TEST_3(ARRAY_TEST_3_DATA::random(rng))),
38209            ARRAY_TEST_4_DATA::ID => Some(Self::ARRAY_TEST_4(ARRAY_TEST_4_DATA::random(rng))),
38210            ARRAY_TEST_5_DATA::ID => Some(Self::ARRAY_TEST_5(ARRAY_TEST_5_DATA::random(rng))),
38211            ARRAY_TEST_6_DATA::ID => Some(Self::ARRAY_TEST_6(ARRAY_TEST_6_DATA::random(rng))),
38212            ARRAY_TEST_7_DATA::ID => Some(Self::ARRAY_TEST_7(ARRAY_TEST_7_DATA::random(rng))),
38213            ARRAY_TEST_8_DATA::ID => Some(Self::ARRAY_TEST_8(ARRAY_TEST_8_DATA::random(rng))),
38214            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
38215            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
38216                ATTITUDE_QUATERNION_DATA::random(rng),
38217            )),
38218            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
38219                ATTITUDE_QUATERNION_COV_DATA::random(rng),
38220            )),
38221            ATTITUDE_TARGET_DATA::ID => {
38222                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
38223            }
38224            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
38225            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
38226            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
38227                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
38228                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
38229                ))
38230            }
38231            AUTOPILOT_VERSION_DATA::ID => {
38232                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
38233            }
38234            AVAILABLE_MODES_DATA::ID => {
38235                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
38236            }
38237            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
38238                AVAILABLE_MODES_MONITOR_DATA::random(rng),
38239            )),
38240            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
38241            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
38242            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
38243            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
38244                CAMERA_CAPTURE_STATUS_DATA::random(rng),
38245            )),
38246            CAMERA_FOV_STATUS_DATA::ID => {
38247                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
38248            }
38249            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
38250                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
38251            )),
38252            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
38253                CAMERA_INFORMATION_DATA::random(rng),
38254            )),
38255            CAMERA_SETTINGS_DATA::ID => {
38256                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
38257            }
38258            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
38259                CAMERA_THERMAL_RANGE_DATA::random(rng),
38260            )),
38261            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
38262                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
38263            )),
38264            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
38265                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
38266            )),
38267            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
38268            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
38269            CAN_FILTER_MODIFY_DATA::ID => {
38270                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
38271            }
38272            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
38273            CELLULAR_CONFIG_DATA::ID => {
38274                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
38275            }
38276            CELLULAR_STATUS_DATA::ID => {
38277                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
38278            }
38279            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
38280                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
38281            )),
38282            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
38283                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
38284            )),
38285            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
38286            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
38287            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
38288            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
38289            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
38290            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
38291                COMPONENT_INFORMATION_DATA::random(rng),
38292            )),
38293            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
38294                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
38295            )),
38296            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
38297                COMPONENT_METADATA_DATA::random(rng),
38298            )),
38299            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
38300                CONTROL_SYSTEM_STATE_DATA::random(rng),
38301            )),
38302            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
38303                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
38304            )),
38305            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
38306            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
38307            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
38308                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
38309            )),
38310            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
38311            DEBUG_FLOAT_ARRAY_DATA::ID => {
38312                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
38313            }
38314            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
38315            DISTANCE_SENSOR_DATA::ID => {
38316                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
38317            }
38318            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
38319            ENCAPSULATED_DATA_DATA::ID => {
38320                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
38321            }
38322            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
38323            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
38324            ESTIMATOR_STATUS_DATA::ID => {
38325                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
38326            }
38327            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
38328            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
38329                EXTENDED_SYS_STATE_DATA::random(rng),
38330            )),
38331            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
38332            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
38333                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
38334            )),
38335            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
38336                FLIGHT_INFORMATION_DATA::random(rng),
38337            )),
38338            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
38339            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
38340            GENERATOR_STATUS_DATA::ID => {
38341                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
38342            }
38343            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
38344                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
38345            )),
38346            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
38347                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
38348            )),
38349            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
38350                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
38351            )),
38352            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
38353                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
38354            )),
38355            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
38356                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
38357            )),
38358            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
38359                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
38360                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
38361                ))
38362            }
38363            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
38364                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
38365            )),
38366            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
38367                GIMBAL_MANAGER_STATUS_DATA::random(rng),
38368            )),
38369            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
38370                GLOBAL_POSITION_INT_DATA::random(rng),
38371            )),
38372            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
38373                GLOBAL_POSITION_INT_COV_DATA::random(rng),
38374            )),
38375            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
38376                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
38377                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
38378                ))
38379            }
38380            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
38381            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
38382            GPS_GLOBAL_ORIGIN_DATA::ID => {
38383                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
38384            }
38385            GPS_INJECT_DATA_DATA::ID => {
38386                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
38387            }
38388            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
38389            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
38390            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
38391            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
38392            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
38393            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
38394            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
38395            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
38396            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
38397            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
38398                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
38399            )),
38400            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
38401            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
38402            HIL_OPTICAL_FLOW_DATA::ID => {
38403                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
38404            }
38405            HIL_RC_INPUTS_RAW_DATA::ID => {
38406                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
38407            }
38408            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
38409            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
38410            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
38411                HIL_STATE_QUATERNION_DATA::random(rng),
38412            )),
38413            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
38414            HYGROMETER_SENSOR_DATA::ID => {
38415                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
38416            }
38417            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
38418                ILLUMINATOR_STATUS_DATA::random(rng),
38419            )),
38420            ISBD_LINK_STATUS_DATA::ID => {
38421                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
38422            }
38423            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
38424            LINK_NODE_STATUS_DATA::ID => {
38425                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
38426            }
38427            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
38428                LOCAL_POSITION_NED_DATA::random(rng),
38429            )),
38430            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
38431                LOCAL_POSITION_NED_COV_DATA::random(rng),
38432            )),
38433            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
38434                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
38435                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
38436                ))
38437            }
38438            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
38439            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
38440            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
38441                LOGGING_DATA_ACKED_DATA::random(rng),
38442            )),
38443            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
38444            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
38445            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
38446            LOG_REQUEST_DATA_DATA::ID => {
38447                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
38448            }
38449            LOG_REQUEST_END_DATA::ID => {
38450                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
38451            }
38452            LOG_REQUEST_LIST_DATA::ID => {
38453                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
38454            }
38455            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
38456            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
38457            MANUAL_SETPOINT_DATA::ID => {
38458                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
38459            }
38460            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
38461            MESSAGE_INTERVAL_DATA::ID => {
38462                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
38463            }
38464            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
38465            MISSION_CLEAR_ALL_DATA::ID => {
38466                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
38467            }
38468            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
38469            MISSION_CURRENT_DATA::ID => {
38470                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
38471            }
38472            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
38473            MISSION_ITEM_INT_DATA::ID => {
38474                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
38475            }
38476            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
38477                MISSION_ITEM_REACHED_DATA::random(rng),
38478            )),
38479            MISSION_REQUEST_DATA::ID => {
38480                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
38481            }
38482            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
38483                MISSION_REQUEST_INT_DATA::random(rng),
38484            )),
38485            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
38486                MISSION_REQUEST_LIST_DATA::random(rng),
38487            )),
38488            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
38489                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
38490            )),
38491            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
38492                MISSION_SET_CURRENT_DATA::random(rng),
38493            )),
38494            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
38495                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
38496            )),
38497            MOUNT_ORIENTATION_DATA::ID => {
38498                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
38499            }
38500            NAMED_VALUE_FLOAT_DATA::ID => {
38501                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
38502            }
38503            NAMED_VALUE_INT_DATA::ID => {
38504                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
38505            }
38506            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
38507                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
38508            )),
38509            OBSTACLE_DISTANCE_DATA::ID => {
38510                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
38511            }
38512            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
38513            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
38514                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
38515            )),
38516            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
38517                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
38518            )),
38519            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
38520                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
38521            )),
38522            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
38523                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
38524            )),
38525            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
38526                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
38527            )),
38528            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
38529                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
38530            )),
38531            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
38532                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
38533            )),
38534            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
38535                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
38536            )),
38537            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
38538                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
38539            )),
38540            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
38541                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
38542            )),
38543            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
38544            OPTICAL_FLOW_RAD_DATA::ID => {
38545                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
38546            }
38547            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
38548                ORBIT_EXECUTION_STATUS_DATA::random(rng),
38549            )),
38550            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
38551            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
38552                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
38553            )),
38554            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
38555                PARAM_EXT_REQUEST_READ_DATA::random(rng),
38556            )),
38557            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
38558            PARAM_EXT_VALUE_DATA::ID => {
38559                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
38560            }
38561            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
38562            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
38563                PARAM_REQUEST_LIST_DATA::random(rng),
38564            )),
38565            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
38566                PARAM_REQUEST_READ_DATA::random(rng),
38567            )),
38568            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
38569            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
38570            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
38571            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
38572            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
38573            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
38574                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
38575            )),
38576            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
38577                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
38578            )),
38579            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
38580            PROTOCOL_VERSION_DATA::ID => {
38581                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
38582            }
38583            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
38584            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
38585            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
38586            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
38587            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
38588            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
38589                RC_CHANNELS_OVERRIDE_DATA::random(rng),
38590            )),
38591            RC_CHANNELS_RAW_DATA::ID => {
38592                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
38593            }
38594            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
38595                RC_CHANNELS_SCALED_DATA::random(rng),
38596            )),
38597            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
38598                REQUEST_DATA_STREAM_DATA::random(rng),
38599            )),
38600            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
38601            RESOURCE_REQUEST_DATA::ID => {
38602                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
38603            }
38604            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
38605                RESPONSE_EVENT_ERROR_DATA::random(rng),
38606            )),
38607            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
38608                SAFETY_ALLOWED_AREA_DATA::random(rng),
38609            )),
38610            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
38611                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
38612            )),
38613            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
38614            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
38615            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
38616            SCALED_PRESSURE_DATA::ID => {
38617                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
38618            }
38619            SCALED_PRESSURE2_DATA::ID => {
38620                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
38621            }
38622            SCALED_PRESSURE3_DATA::ID => {
38623                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
38624            }
38625            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
38626            SERVO_OUTPUT_RAW_DATA::ID => {
38627                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
38628            }
38629            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
38630            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
38631                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
38632            )),
38633            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
38634                SET_ATTITUDE_TARGET_DATA::random(rng),
38635            )),
38636            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
38637                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
38638            )),
38639            SET_HOME_POSITION_DATA::ID => {
38640                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
38641            }
38642            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
38643            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
38644                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
38645            )),
38646            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
38647                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
38648            )),
38649            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
38650            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
38651                SMART_BATTERY_INFO_DATA::random(rng),
38652            )),
38653            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
38654            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
38655                STORAGE_INFORMATION_DATA::random(rng),
38656            )),
38657            SUPPORTED_TUNES_DATA::ID => {
38658                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
38659            }
38660            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
38661            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
38662            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
38663            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
38664            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
38665            TERRAIN_REQUEST_DATA::ID => {
38666                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
38667            }
38668            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
38669            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
38670                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
38671            )),
38672            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
38673                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
38674                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
38675                ))
38676            }
38677            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
38678                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
38679                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
38680                ))
38681            }
38682            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
38683            UAVCAN_NODE_INFO_DATA::ID => {
38684                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
38685            }
38686            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
38687                UAVCAN_NODE_STATUS_DATA::random(rng),
38688            )),
38689            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
38690                UTM_GLOBAL_POSITION_DATA::random(rng),
38691            )),
38692            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
38693            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
38694            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
38695            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
38696                VICON_POSITION_ESTIMATE_DATA::random(rng),
38697            )),
38698            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
38699                VIDEO_STREAM_INFORMATION_DATA::random(rng),
38700            )),
38701            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
38702                VIDEO_STREAM_STATUS_DATA::random(rng),
38703            )),
38704            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
38705                VISION_POSITION_ESTIMATE_DATA::random(rng),
38706            )),
38707            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
38708                VISION_SPEED_ESTIMATE_DATA::random(rng),
38709            )),
38710            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
38711            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
38712            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
38713            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
38714            _ => None,
38715        }
38716    }
38717    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
38718        match self {
38719            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
38720            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
38721            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
38722            Self::AIS_VESSEL(body) => body.ser(version, bytes),
38723            Self::ALTITUDE(body) => body.ser(version, bytes),
38724            Self::ARRAY_TEST_0(body) => body.ser(version, bytes),
38725            Self::ARRAY_TEST_1(body) => body.ser(version, bytes),
38726            Self::ARRAY_TEST_3(body) => body.ser(version, bytes),
38727            Self::ARRAY_TEST_4(body) => body.ser(version, bytes),
38728            Self::ARRAY_TEST_5(body) => body.ser(version, bytes),
38729            Self::ARRAY_TEST_6(body) => body.ser(version, bytes),
38730            Self::ARRAY_TEST_7(body) => body.ser(version, bytes),
38731            Self::ARRAY_TEST_8(body) => body.ser(version, bytes),
38732            Self::ATTITUDE(body) => body.ser(version, bytes),
38733            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
38734            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
38735            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
38736            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
38737            Self::AUTH_KEY(body) => body.ser(version, bytes),
38738            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
38739            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
38740            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
38741            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
38742            Self::BATTERY_INFO(body) => body.ser(version, bytes),
38743            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
38744            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
38745            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
38746            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
38747            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
38748            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
38749            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
38750            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
38751            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
38752            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
38753            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
38754            Self::CANFD_FRAME(body) => body.ser(version, bytes),
38755            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
38756            Self::CAN_FRAME(body) => body.ser(version, bytes),
38757            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
38758            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
38759            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
38760            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
38761            Self::COLLISION(body) => body.ser(version, bytes),
38762            Self::COMMAND_ACK(body) => body.ser(version, bytes),
38763            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
38764            Self::COMMAND_INT(body) => body.ser(version, bytes),
38765            Self::COMMAND_LONG(body) => body.ser(version, bytes),
38766            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
38767            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
38768            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
38769            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
38770            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
38771            Self::CURRENT_MODE(body) => body.ser(version, bytes),
38772            Self::DATA_STREAM(body) => body.ser(version, bytes),
38773            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
38774            Self::DEBUG(body) => body.ser(version, bytes),
38775            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
38776            Self::DEBUG_VECT(body) => body.ser(version, bytes),
38777            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
38778            Self::EFI_STATUS(body) => body.ser(version, bytes),
38779            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
38780            Self::ESC_INFO(body) => body.ser(version, bytes),
38781            Self::ESC_STATUS(body) => body.ser(version, bytes),
38782            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
38783            Self::EVENT(body) => body.ser(version, bytes),
38784            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
38785            Self::FENCE_STATUS(body) => body.ser(version, bytes),
38786            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
38787            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
38788            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
38789            Self::FUEL_STATUS(body) => body.ser(version, bytes),
38790            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
38791            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
38792            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
38793            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
38794            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
38795            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
38796            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
38797            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
38798            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
38799            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
38800            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
38801            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
38802            Self::GPS2_RAW(body) => body.ser(version, bytes),
38803            Self::GPS2_RTK(body) => body.ser(version, bytes),
38804            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
38805            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
38806            Self::GPS_INPUT(body) => body.ser(version, bytes),
38807            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
38808            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
38809            Self::GPS_RTK(body) => body.ser(version, bytes),
38810            Self::GPS_STATUS(body) => body.ser(version, bytes),
38811            Self::HEARTBEAT(body) => body.ser(version, bytes),
38812            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
38813            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
38814            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
38815            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
38816            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
38817            Self::HIL_GPS(body) => body.ser(version, bytes),
38818            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
38819            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
38820            Self::HIL_SENSOR(body) => body.ser(version, bytes),
38821            Self::HIL_STATE(body) => body.ser(version, bytes),
38822            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
38823            Self::HOME_POSITION(body) => body.ser(version, bytes),
38824            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
38825            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
38826            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
38827            Self::LANDING_TARGET(body) => body.ser(version, bytes),
38828            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
38829            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
38830            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
38831            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
38832            Self::LOGGING_ACK(body) => body.ser(version, bytes),
38833            Self::LOGGING_DATA(body) => body.ser(version, bytes),
38834            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
38835            Self::LOG_DATA(body) => body.ser(version, bytes),
38836            Self::LOG_ENTRY(body) => body.ser(version, bytes),
38837            Self::LOG_ERASE(body) => body.ser(version, bytes),
38838            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
38839            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
38840            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
38841            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
38842            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
38843            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
38844            Self::MEMORY_VECT(body) => body.ser(version, bytes),
38845            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
38846            Self::MISSION_ACK(body) => body.ser(version, bytes),
38847            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
38848            Self::MISSION_COUNT(body) => body.ser(version, bytes),
38849            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
38850            Self::MISSION_ITEM(body) => body.ser(version, bytes),
38851            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
38852            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
38853            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
38854            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
38855            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
38856            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
38857            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
38858            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
38859            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
38860            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
38861            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
38862            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
38863            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
38864            Self::ODOMETRY(body) => body.ser(version, bytes),
38865            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
38866            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
38867            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
38868            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
38869            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
38870            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
38871            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
38872            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
38873            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
38874            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
38875            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
38876            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
38877            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
38878            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
38879            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
38880            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
38881            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
38882            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
38883            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
38884            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
38885            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
38886            Self::PARAM_SET(body) => body.ser(version, bytes),
38887            Self::PARAM_VALUE(body) => body.ser(version, bytes),
38888            Self::PING(body) => body.ser(version, bytes),
38889            Self::PLAY_TUNE(body) => body.ser(version, bytes),
38890            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
38891            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
38892            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
38893            Self::POWER_STATUS(body) => body.ser(version, bytes),
38894            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
38895            Self::RADIO_STATUS(body) => body.ser(version, bytes),
38896            Self::RAW_IMU(body) => body.ser(version, bytes),
38897            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
38898            Self::RAW_RPM(body) => body.ser(version, bytes),
38899            Self::RC_CHANNELS(body) => body.ser(version, bytes),
38900            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
38901            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
38902            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
38903            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
38904            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
38905            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
38906            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
38907            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
38908            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
38909            Self::SCALED_IMU(body) => body.ser(version, bytes),
38910            Self::SCALED_IMU2(body) => body.ser(version, bytes),
38911            Self::SCALED_IMU3(body) => body.ser(version, bytes),
38912            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
38913            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
38914            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
38915            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
38916            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
38917            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
38918            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
38919            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
38920            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
38921            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
38922            Self::SET_MODE(body) => body.ser(version, bytes),
38923            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
38924            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
38925            Self::SIM_STATE(body) => body.ser(version, bytes),
38926            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
38927            Self::STATUSTEXT(body) => body.ser(version, bytes),
38928            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
38929            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
38930            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
38931            Self::SYS_STATUS(body) => body.ser(version, bytes),
38932            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
38933            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
38934            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
38935            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
38936            Self::TIMESYNC(body) => body.ser(version, bytes),
38937            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
38938            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
38939            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
38940            Self::TUNNEL(body) => body.ser(version, bytes),
38941            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
38942            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
38943            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
38944            Self::V2_EXTENSION(body) => body.ser(version, bytes),
38945            Self::VFR_HUD(body) => body.ser(version, bytes),
38946            Self::VIBRATION(body) => body.ser(version, bytes),
38947            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
38948            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
38949            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
38950            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
38951            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
38952            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
38953            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
38954            Self::WINCH_STATUS(body) => body.ser(version, bytes),
38955            Self::WIND_COV(body) => body.ser(version, bytes),
38956        }
38957    }
38958    fn extra_crc(id: u32) -> u8 {
38959        match id {
38960            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
38961            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
38962            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
38963            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
38964            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
38965            ARRAY_TEST_0_DATA::ID => ARRAY_TEST_0_DATA::EXTRA_CRC,
38966            ARRAY_TEST_1_DATA::ID => ARRAY_TEST_1_DATA::EXTRA_CRC,
38967            ARRAY_TEST_3_DATA::ID => ARRAY_TEST_3_DATA::EXTRA_CRC,
38968            ARRAY_TEST_4_DATA::ID => ARRAY_TEST_4_DATA::EXTRA_CRC,
38969            ARRAY_TEST_5_DATA::ID => ARRAY_TEST_5_DATA::EXTRA_CRC,
38970            ARRAY_TEST_6_DATA::ID => ARRAY_TEST_6_DATA::EXTRA_CRC,
38971            ARRAY_TEST_7_DATA::ID => ARRAY_TEST_7_DATA::EXTRA_CRC,
38972            ARRAY_TEST_8_DATA::ID => ARRAY_TEST_8_DATA::EXTRA_CRC,
38973            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
38974            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
38975            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
38976            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
38977            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
38978            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
38979            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
38980                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
38981            }
38982            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
38983            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
38984            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
38985            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
38986            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
38987            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
38988            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
38989            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
38990            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
38991            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
38992            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
38993            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
38994            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
38995            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
38996            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
38997            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
38998            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
38999            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
39000            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
39001            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
39002            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
39003            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
39004            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
39005            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
39006            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
39007            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
39008            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
39009            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
39010            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
39011            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
39012            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
39013            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
39014            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
39015            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
39016            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
39017            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
39018            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
39019            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
39020            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
39021            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
39022            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
39023            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
39024            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
39025            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
39026            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
39027            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
39028            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
39029            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
39030            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
39031            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
39032            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
39033            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
39034            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
39035            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
39036            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
39037            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
39038            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
39039            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
39040                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
39041            }
39042            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
39043            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
39044            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
39045            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
39046            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
39047                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
39048            }
39049            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
39050            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
39051            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
39052            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
39053            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
39054            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
39055            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
39056            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
39057            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
39058            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
39059            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
39060            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
39061            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
39062            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
39063            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
39064            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
39065            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
39066            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
39067            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
39068            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
39069            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
39070            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
39071            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
39072            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
39073            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
39074            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
39075            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
39076            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
39077            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
39078            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
39079                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
39080            }
39081            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
39082            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
39083            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
39084            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
39085            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
39086            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
39087            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
39088            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
39089            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
39090            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
39091            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
39092            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
39093            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
39094            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
39095            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
39096            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
39097            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
39098            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
39099            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
39100            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
39101            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
39102            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
39103            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
39104            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
39105            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
39106            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
39107            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
39108            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
39109            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
39110            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
39111            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
39112            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
39113            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
39114            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
39115            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
39116            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
39117            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
39118            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
39119            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
39120            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
39121            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
39122            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
39123            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
39124            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
39125            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
39126            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
39127            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
39128            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
39129            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
39130            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
39131            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
39132            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
39133            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
39134            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
39135            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
39136            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
39137            PING_DATA::ID => PING_DATA::EXTRA_CRC,
39138            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
39139            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
39140            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
39141            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
39142            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
39143            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
39144            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
39145            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
39146            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
39147            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
39148            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
39149            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
39150            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
39151            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
39152            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
39153            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
39154            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
39155            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
39156            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
39157            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
39158            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
39159            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
39160            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
39161            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
39162            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
39163            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
39164            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
39165            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
39166            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
39167            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
39168            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
39169            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
39170            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
39171            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
39172            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
39173                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
39174            }
39175            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
39176            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
39177            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
39178            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
39179            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
39180            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
39181            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
39182            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
39183            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
39184            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
39185            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
39186            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
39187            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
39188            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
39189            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
39190                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
39191            }
39192            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
39193                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
39194            }
39195            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
39196            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
39197            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
39198            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
39199            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
39200            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
39201            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
39202            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
39203            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
39204            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
39205            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
39206            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
39207            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
39208            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
39209            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
39210            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
39211            _ => 0,
39212        }
39213    }
39214    fn target_system_id(&self) -> Option<u8> {
39215        match self {
39216            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
39217            Self::CANFD_FRAME(inner) => Some(inner.target_system),
39218            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
39219            Self::CAN_FRAME(inner) => Some(inner.target_system),
39220            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
39221            Self::COMMAND_ACK(inner) => Some(inner.target_system),
39222            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
39223            Self::COMMAND_INT(inner) => Some(inner.target_system),
39224            Self::COMMAND_LONG(inner) => Some(inner.target_system),
39225            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
39226            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
39227            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
39228            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
39229            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
39230            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
39231            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
39232            Self::LOGGING_ACK(inner) => Some(inner.target_system),
39233            Self::LOGGING_DATA(inner) => Some(inner.target_system),
39234            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
39235            Self::LOG_ERASE(inner) => Some(inner.target_system),
39236            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
39237            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
39238            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
39239            Self::MISSION_ACK(inner) => Some(inner.target_system),
39240            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
39241            Self::MISSION_COUNT(inner) => Some(inner.target_system),
39242            Self::MISSION_ITEM(inner) => Some(inner.target_system),
39243            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
39244            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
39245            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
39246            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
39247            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
39248            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
39249            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
39250            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
39251            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
39252            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
39253            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
39254            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
39255            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
39256            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
39257            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
39258            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
39259            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
39260            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
39261            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
39262            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
39263            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
39264            Self::PARAM_SET(inner) => Some(inner.target_system),
39265            Self::PING(inner) => Some(inner.target_system),
39266            Self::PLAY_TUNE(inner) => Some(inner.target_system),
39267            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
39268            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
39269            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
39270            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
39271            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
39272            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
39273            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
39274            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
39275            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
39276            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
39277            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
39278            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
39279            Self::SET_MODE(inner) => Some(inner.target_system),
39280            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
39281            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
39282            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
39283            Self::TIMESYNC(inner) => Some(inner.target_system),
39284            Self::TUNNEL(inner) => Some(inner.target_system),
39285            Self::V2_EXTENSION(inner) => Some(inner.target_system),
39286            _ => None,
39287        }
39288    }
39289    fn target_component_id(&self) -> Option<u8> {
39290        match self {
39291            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
39292            Self::CANFD_FRAME(inner) => Some(inner.target_component),
39293            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
39294            Self::CAN_FRAME(inner) => Some(inner.target_component),
39295            Self::COMMAND_ACK(inner) => Some(inner.target_component),
39296            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
39297            Self::COMMAND_INT(inner) => Some(inner.target_component),
39298            Self::COMMAND_LONG(inner) => Some(inner.target_component),
39299            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
39300            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
39301            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
39302            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
39303            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
39304            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
39305            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
39306            Self::LOGGING_ACK(inner) => Some(inner.target_component),
39307            Self::LOGGING_DATA(inner) => Some(inner.target_component),
39308            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
39309            Self::LOG_ERASE(inner) => Some(inner.target_component),
39310            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
39311            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
39312            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
39313            Self::MISSION_ACK(inner) => Some(inner.target_component),
39314            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
39315            Self::MISSION_COUNT(inner) => Some(inner.target_component),
39316            Self::MISSION_ITEM(inner) => Some(inner.target_component),
39317            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
39318            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
39319            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
39320            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
39321            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
39322            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
39323            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
39324            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
39325            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
39326            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
39327            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
39328            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
39329            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
39330            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
39331            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
39332            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
39333            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
39334            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
39335            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
39336            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
39337            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
39338            Self::PARAM_SET(inner) => Some(inner.target_component),
39339            Self::PING(inner) => Some(inner.target_component),
39340            Self::PLAY_TUNE(inner) => Some(inner.target_component),
39341            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
39342            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
39343            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
39344            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
39345            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
39346            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
39347            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
39348            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
39349            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
39350            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
39351            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
39352            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
39353            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
39354            Self::TIMESYNC(inner) => Some(inner.target_component),
39355            Self::TUNNEL(inner) => Some(inner.target_component),
39356            Self::V2_EXTENSION(inner) => Some(inner.target_component),
39357            _ => None,
39358        }
39359    }
39360}